@@ -51,7 +51,8 @@ The correct text colors will automatically be calculated based on the provided t
51
51
#### mdl-theme-prop mixin
52
52
53
53
MDL Theme exports an ` mdl-theme-prop ` mixin, which can be used to apply a theme color to a property. The mixin takes the
54
- property name as the first parameter, and the desired color as the second one.
54
+ property name as the first parameter, and the desired color as the second one. It also has an optional boolean parameter
55
+ for whether ` !important ` should be applied to the value.
55
56
56
57
For example, if you wanted to set the background of ` .foo ` to the primary color, and the text color to suit primary text
57
58
on top of it:
@@ -258,6 +259,9 @@ Determines whether to use light or dark text on top of a given color.
258
259
</span >
259
260
```
260
261
262
+ > Note: These classes use ` !important ` on the values, since they're user-specified and are applied to ensure that a
263
+ particular color gets used.
264
+
261
265
There are a number of CSS classes available for taking advantage of theming.
262
266
263
267
#### Theme color classes
@@ -338,15 +342,15 @@ calculate the correct text colors to use, based on the chosen theme colors. Thes
338
342
339
343
#### Theme colors
340
344
341
- | Class | Description |
345
+ | Custom property | Description |
342
346
| ------------------------ | --------------------------- |
343
347
| ` --mdl-theme-primary ` | The theme primary color. |
344
348
| ` --mdl-theme-accent ` | The theme accent color. |
345
349
| ` --mdl-theme-background ` | The theme background color. |
346
350
347
351
#### Text on a theme primary color background
348
352
349
- | Class | Description |
353
+ | Custom property | Description |
350
354
| ------------------------------------------ | ---------------------------------------------------------- |
351
355
| ` --mdl-theme-text-primary-on-primary ` | Primary text on top of a theme primary color background. |
352
356
| ` --mdl-theme-text-secondary-on-primary ` | Secondary text on top of a theme primary color background. |
@@ -356,7 +360,7 @@ calculate the correct text colors to use, based on the chosen theme colors. Thes
356
360
357
361
#### Text on a theme accent color background
358
362
359
- | Class | Description |
363
+ | Custom property | Description |
360
364
| ------------------------------------------ | ---------------------------------------------------------- |
361
365
| ` --mdl-theme-text-primary-on-accent ` | Primary text on top of a theme accent color background. |
362
366
| ` --mdl-theme-text-secondary-on-accent ` | Secondary text on top of a theme accent color background. |
@@ -366,7 +370,7 @@ calculate the correct text colors to use, based on the chosen theme colors. Thes
366
370
367
371
#### Text on the theme background
368
372
369
- | Class | Description |
373
+ | Custom property | Description |
370
374
| ------------------------------------------ | ---------------------------------------------------------- |
371
375
| ` --mdl-theme-text-primary-on-background ` | Primary text on top of the theme background. |
372
376
| ` --mdl-theme-text-secondary-on-background ` | Secondary text on top of the theme background. |
@@ -376,7 +380,7 @@ calculate the correct text colors to use, based on the chosen theme colors. Thes
376
380
377
381
#### Text on a light-colored background (useful for custom backgrounds)
378
382
379
- | Class | Description |
383
+ | Custom property | Description |
380
384
| ------------------------------------------ | ---------------------------------------------------------- |
381
385
| ` --mdl-theme-text-primary-on-light ` | Primary text on top of a light-colored background. |
382
386
| ` --mdl-theme-text-secondary-on-light ` | Secondary text on top of a light-colored background. |
@@ -386,7 +390,7 @@ calculate the correct text colors to use, based on the chosen theme colors. Thes
386
390
387
391
#### Text on a dark-colored background (useful for custom backgrounds)
388
392
389
- | Class | Description |
393
+ | Custom property | Description |
390
394
| ------------------------------------------ | ---------------------------------------------------------- |
391
395
| ` --mdl-theme-text-primary-on-dark ` | Primary text on top of a dark-colored background. |
392
396
| ` --mdl-theme-text-secondary-on-dark ` | Secondary text on top of a dark-colored background. |
0 commit comments