Skip to content

Commit ecf370b

Browse files
authored
feat(dimmer): support other types of background beside color
While i initially thought about implementing a new dimmer variant based on a different background, i tried to simply change the dimmer variables instead, so my idea would work by just creating a new theme. However, as the dimmer currently only supports background-color this prevents to use an image or a radial gradient as dimmer background for the existing variables. That said, this PR changes the background-color property to just background which is compatible with the default color value and allows for themes to use other other type of background than just the color. Again: This PR does not change the default theme behavior, it just provides the possibility to use other background-types than just the color
1 parent 0f558b9 commit ecf370b

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

src/definitions/modules/dimmer.less

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
vertical-align: @verticalAlign;
3939
padding: @padding;
4040

41-
background-color: @backgroundColor;
41+
background: @backgroundColor;
4242
opacity: @hiddenOpacity;
4343
line-height: @lineHeight;
4444

@@ -181,10 +181,10 @@ body.dimmable > .dimmer {
181181

182182
/* Dimmer Color */
183183
.blurring.dimmable > .dimmer {
184-
background-color: @blurredBackgroundColor;
184+
background: @blurredBackgroundColor;
185185
}
186186
.blurring.dimmable > .inverted.dimmer {
187-
background-color: @blurredInvertedBackgroundColor;
187+
background: @blurredInvertedBackgroundColor;
188188
}
189189
}
190190
& when (@variationDimmerAligned) {
@@ -206,13 +206,13 @@ body.dimmable > .dimmer {
206206
---------------*/
207207

208208
.medium.medium.medium.medium.medium.dimmer {
209-
background-color: @mediumBackgroundColor;
209+
background: @mediumBackgroundColor;
210210
}
211211
.light.light.light.light.light.dimmer {
212-
background-color: @lightBackgroundColor;
212+
background: @lightBackgroundColor;
213213
}
214214
.very.light.light.light.light.dimmer {
215-
background-color: @veryLightBackgroundColor;
215+
background: @veryLightBackgroundColor;
216216
}
217217
}
218218

@@ -222,7 +222,7 @@ body.dimmable > .dimmer {
222222
---------------*/
223223

224224
.ui.inverted.dimmer {
225-
background-color: @invertedBackgroundColor;
225+
background: @invertedBackgroundColor;
226226
}
227227
.ui.inverted.dimmer > .content,
228228
.ui.inverted.dimmer > .content > * {
@@ -235,13 +235,13 @@ body.dimmable > .dimmer {
235235
---------------*/
236236

237237
.medium.medium.medium.medium.medium.inverted.dimmer {
238-
background-color: @mediumInvertedBackgroundColor;
238+
background: @mediumInvertedBackgroundColor;
239239
}
240240
.light.light.light.light.light.inverted.dimmer {
241-
background-color: @lightInvertedBackgroundColor;
241+
background: @lightInvertedBackgroundColor;
242242
}
243243
.very.light.light.light.light.inverted.dimmer {
244-
background-color: @veryLightInvertedBackgroundColor;
244+
background: @veryLightInvertedBackgroundColor;
245245
}
246246
}
247247
}
@@ -259,22 +259,22 @@ body.dimmable > .dimmer {
259259
width: 0;
260260
height: 0;
261261
z-index: -100;
262-
background-color: @simpleStartBackgroundColor;
262+
background: @simpleStartBackgroundColor;
263263
}
264264
.dimmed.dimmable > .ui.simple.dimmer {
265265
overflow: visible;
266266
opacity: 1;
267267
width: 100%;
268268
height: 100%;
269-
background-color: @simpleEndBackgroundColor;
269+
background: @simpleEndBackgroundColor;
270270
z-index: @simpleZIndex;
271271
}
272272

273273
.ui.simple.inverted.dimmer {
274-
background-color: @simpleInvertedStartBackgroundColor;
274+
background: @simpleInvertedStartBackgroundColor;
275275
}
276276
.dimmed.dimmable > .ui.simple.inverted.dimmer {
277-
background-color: @simpleInvertedEndBackgroundColor;
277+
background: @simpleInvertedEndBackgroundColor;
278278
}
279279
}
280280

src/definitions/modules/sidebar.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ body.pushable > .pusher {
162162
top: 0;
163163
right: 0;
164164
content: '';
165-
background-color: @dimmerColor;
165+
background: @dimmerColor;
166166
overflow: hidden;
167167
opacity: 0;
168168
transition: @dimmerTransition;

src/definitions/views/card.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343

344344
.ui.cards > .card .dimmer,
345345
.ui.card .dimmer {
346-
background-color: @dimmerColor;
346+
background: @dimmerColor;
347347
z-index: @dimmerZIndex;
348348
}
349349

0 commit comments

Comments
 (0)