Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: chrome/browser/resources/shared/css/tree.css

Issue 8341081: Add icon-visibility attribute to cr.ui.Tree. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Define property on cr.ui.Tree and fix style. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 tree { 1 tree {
2 outline: none; 2 outline: none;
3 overflow: auto; 3 overflow: auto;
4 display: block; 4 display: block;
5 } 5 }
6 6
7 .tree-item > .tree-row { 7 .tree-item > .tree-row {
8 color: black; 8 color: black;
9 -webkit-user-select: none; 9 -webkit-user-select: none;
10 border: 1px solid rgba(255,255,255,0); /* transparent white */ 10 border: 1px solid rgba(255,255,255,0); /* transparent white */
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 .tree-children { 92 .tree-children {
93 display: none; 93 display: none;
94 } 94 }
95 95
96 .tree-item > .tree-row > * { 96 .tree-item > .tree-row > * {
97 display: inline-block; 97 display: inline-block;
98 box-sizing: border-box; 98 box-sizing: border-box;
99 } 99 }
100 100
101 .tree-label { 101 .tree-label {
102 -webkit-padding-start: 20px;
103 background-image: url("../../../../../ui/resources/folder_closed.png");
104 background-position: 0 50%;
105 background-repeat: no-repeat;
106 white-space: pre; 102 white-space: pre;
107 } 103 }
108 104
105 tree[icon-visibility] .tree-label {
arv (Not doing code reviews) 2011/10/28 16:15:12 Sorry, I should have paid more attention the first
flackr 2011/10/28 22:32:50 If A and C are the same then this needs to change.
arv (Not doing code reviews) 2011/10/28 22:41:03 To me, the important part is that <tree> does not
flackr 2011/10/31 14:37:56 Okay, the default behaviour will be as it was befo
106 -webkit-padding-start: 20px;
107 background-position: 0 50%;
108 background-repeat: no-repeat;
109 }
110
111 tree[icon-visibility=all] .tree-label,
112 tree[icon-visibility=parent] .tree-row[may-have-children] > .tree-label {
113 background-image: url("../../../../../ui/resources/folder_closed.png");
114 }
115
116 tree[icon-visibility=parent] .tree-row[has-children=false] > .tree-label {
117 background-image: none;
118 }
119
120 tree[icon-visibility] .tree-item[expanded] > .tree-row > .tree-label {
121 background-image: url("../../../../../ui/resources/folder_open.png");
122 }
123
109 /* We need to ensure that even empty labels take up space */ 124 /* We need to ensure that even empty labels take up space */
110 .tree-label:empty:after { 125 .tree-label:empty:after {
111 content: " "; 126 content: " ";
112 white-space: pre; 127 white-space: pre;
113 } 128 }
114 129
115 .tree-rename > .tree-row > .tree-label { 130 .tree-rename > .tree-row > .tree-label {
116 -webkit-user-select: auto; 131 -webkit-user-select: auto;
117 -webkit-user-modify: read-write-plaintext-only; 132 -webkit-user-modify: read-write-plaintext-only;
118 background: white; 133 background: white;
119 color: black; 134 color: black;
120 outline: 1px solid black; 135 outline: 1px solid black;
121 } 136 }
122 137
123 html[dir=rtl] .tree-label { 138 html[dir=rtl] .tree-label {
124 background-position: 100% 50%; 139 background-position: 100% 50%;
125 } 140 }
126 141
127 .tree-item[expanded] > .tree-row > .tree-label { 142 html[dir=rtl] tree[icon-visibility=all] .tree-label,
128 background-image: url("../../../../../ui/resources/folder_open.png"); 143 html[dir=rtl] tree[icon-visibility=parent] .tree-row[may-have-children]
129 } 144 > .tree-label {
130
131 html[dir='rtl'] .tree-label {
132 background-image: url("../../../../../ui/resources/folder_closed_rtl.png"); 145 background-image: url("../../../../../ui/resources/folder_closed_rtl.png");
133 } 146 }
134 147
135 html[dir='rtl'] .tree-item[expanded] > .tree-row > .tree-label { 148 html[dir=rtl] tree[icon-visibility] .tree-item[expanded] > .tree-row
149 > .tree-label {
136 background-image: url("../../../../../ui/resources/folder_open_rtl.png"); 150 background-image: url("../../../../../ui/resources/folder_open_rtl.png");
137 } 151 }
138 152
139 .tree-item[editing] input { 153 .tree-item[editing] input {
140 /* Do not inherit the line-height */ 154 /* Do not inherit the line-height */
141 font-family: inherit; 155 font-family: inherit;
142 font-size: inherit; 156 font-size: inherit;
143 font-weight: inherit; 157 font-weight: inherit;
144 margin: -2px -8px -2px -3px; 158 margin: -2px -8px -2px -3px;
145 padding: 1px 7px 1px 1px; 159 padding: 1px 7px 1px 1px;
146 } 160 }
147 161
148 html:not([os=mac]) .tree-item[editing] input { 162 html:not([os=mac]) .tree-item[editing] input {
149 outline: none; 163 outline: none;
150 } 164 }
151 165
152 html[dir=rtl] .tree-item[editing] input { 166 html[dir=rtl] .tree-item[editing] input {
153 margin: -2px -3px -2px -8px; 167 margin: -2px -3px -2px -8px;
154 padding: 1px 1px 1px 7px; 168 padding: 1px 1px 1px 7px;
155 } 169 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698