Skip to content

Commit 48b1803

Browse files
committed
Split button size CSS rules into text and iconed variants
1 parent 44d8d4b commit 48b1803

1 file changed

Lines changed: 47 additions & 21 deletions

File tree

  • shellfx-material/src/main/resources/com/techsenger/shellfx/material/style

shellfx-material/src/main/resources/com/techsenger/shellfx/material/style/material.css

Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,15 @@
6868
*/
6969

7070
/***************** density-s - size-xxl ******************/
71-
.density-s .button.size-xxl.iconed,
72-
.density-s .toggle-button.size-xxl.iconed {
73-
-fx-padding: 0;
71+
.density-s .button.size-xxl,
72+
.density-s .toggle-button.size-xxl {
7473
-fx-min-height: 2.65em;
7574
-fx-max-height: 2.65em;
7675
-fx-pref-height: 2.65em;
76+
}
77+
.density-s .button.size-xxl.iconed,
78+
.density-s .toggle-button.size-xxl.iconed {
79+
-fx-padding: 0;
7780
-fx-min-width: 2.65em;
7881
-fx-max-width: 2.65em;
7982
-fx-pref-width: 2.65em;
@@ -84,12 +87,15 @@
8487
-fx-icon-size: 2.05em;
8588
}
8689
/***************** density-s - size-xl ******************/
87-
.density-s .button.size-xl.iconed,
88-
.density-s .toggle-button.size-xl.iconed {
89-
-fx-padding: 0;
90+
.density-s .button.size-xl,
91+
.density-s .toggle-button.size-xl {
9092
-fx-min-height: 2.40em;
9193
-fx-max-height: 2.40em;
9294
-fx-pref-height: 2.40em;
95+
}
96+
.density-s .button.size-xl.iconed,
97+
.density-s .toggle-button.size-xl.iconed {
98+
-fx-padding: 0;
9399
-fx-min-width: 2.40em;
94100
-fx-max-width: 2.40em;
95101
-fx-pref-width: 2.40em;
@@ -100,12 +106,15 @@
100106
-fx-icon-size: 1.85em;
101107
}
102108
/***************** density-s - size-l ******************/
103-
.density-s .button.size-l.iconed,
104-
.density-s .toggle-button.size-l.iconed {
105-
-fx-padding: 0;
109+
.density-s .button.size-l,
110+
.density-s .toggle-button.size-l {
106111
-fx-min-height: 2.15em;
107112
-fx-max-height: 2.15em;
108113
-fx-pref-height: 2.15em;
114+
}
115+
.density-s .button.size-l.iconed,
116+
.density-s .toggle-button.size-l.iconed {
117+
-fx-padding: 0;
109118
-fx-min-width: 2.15em;
110119
-fx-max-width: 2.15em;
111120
-fx-pref-width: 2.15em;
@@ -116,12 +125,15 @@
116125
-fx-icon-size: 1.65em;
117126
}
118127
/***************** density-s - size-m ******************/
119-
.density-s .button.size-m.iconed,
120-
.density-s .toggle-button.size-m.iconed {
121-
-fx-padding: 0;
128+
.density-s .button.size-m,
129+
.density-s .toggle-button.size-m {
122130
-fx-min-height: 1.90em;
123131
-fx-max-height: 1.90em;
124132
-fx-pref-height: 1.90em;
133+
}
134+
.density-s .button.size-m.iconed,
135+
.density-s .toggle-button.size-m.iconed {
136+
-fx-padding: 0;
125137
-fx-min-width: 1.90em;
126138
-fx-max-width: 1.90em;
127139
-fx-pref-width: 1.90em;
@@ -132,12 +144,16 @@
132144
-fx-icon-size: 1.45em;
133145
}
134146
/***************** density-s - size-s ******************/
135-
.density-s .button.size-s.iconed,
136-
.density-s .toggle-button.size-s.iconed {
137-
-fx-padding: 0;
147+
.density-s .button.size-s,
148+
.density-s .toggle-button.size-s {
149+
-fx-padding: 0px 6px 2px 6px;
138150
-fx-min-height: 1.60em;
139151
-fx-max-height: 1.60em;
140152
-fx-pref-height: 1.60em;
153+
}
154+
.density-s .button.size-s.iconed,
155+
.density-s .toggle-button.size-s.iconed {
156+
-fx-padding: 0;
141157
-fx-min-width: 1.60em;
142158
-fx-max-width: 1.60em;
143159
-fx-pref-width: 1.60em;
@@ -148,12 +164,15 @@
148164
-fx-icon-size: 1.25em;
149165
}
150166
/***************** density-s - size-xs ******************/
151-
.density-s .button.size-xs.iconed,
152-
.density-s .toggle-button.size-xs.iconed {
153-
-fx-padding: 0;
167+
.density-s .button.size-xs,
168+
.density-s .toggle-button.size-xs {
154169
-fx-min-height: 1.35em;
155170
-fx-max-height: 1.35em;
156171
-fx-pref-height: 1.35em;
172+
}
173+
.density-s .button.size-xs.iconed,
174+
.density-s .toggle-button.size-xs.iconed {
175+
-fx-padding: 0;
157176
-fx-min-width: 1.35em;
158177
-fx-max-width: 1.35em;
159178
-fx-pref-width: 1.35em;
@@ -164,12 +183,15 @@
164183
-fx-icon-size: 1.05em;
165184
}
166185
/***************** density-s - size-xxs ******************/
167-
.density-s .button.size-xxs.iconed,
168-
.density-s .toggle-button.size-xxs.iconed {
169-
-fx-padding: 0;
186+
.density-s .button.size-xxs,
187+
.density-s .toggle-button.size-xxs {
170188
-fx-min-height: 0.715em;
171189
-fx-max-height: 0.715em;
172190
-fx-pref-height: 0.715em;
191+
}
192+
.density-s .button.size-xxs.iconed,
193+
.density-s .toggle-button.size-xxs.iconed {
194+
-fx-padding: 0;
173195
-fx-min-width: 0.715em;
174196
-fx-max-width: 0.715em;
175197
-fx-pref-width: 0.715em;
@@ -194,6 +216,10 @@
194216
-fx-scale-y: 1.1;
195217
}
196218

219+
.button.flat, .button.flat:hover, .toggle-button.flat, .toggle-button.flat:hover {
220+
-fx-underline: false;
221+
}
222+
197223
/*
198224
Label
199225
*/

0 commit comments

Comments
 (0)