- Timestamp:
- 01/20/2021 05:49:28 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/assets/sass/02-tools/mixins.scss
r49726 r49987 21 21 // - Applies button styles to blocks and elements that share them. 22 22 @mixin button-style() { 23 line-height: var(--button--line-height);24 color: var(--button--color-text);23 border: var(--button--border-width) solid transparent; 24 border-radius: var(--button--border-radius); 25 25 cursor: pointer; 26 display: block; 26 27 font-weight: var(--button--font-weight); 27 28 font-family: var(--button--font-family); 28 29 font-size: var(--button--font-size); 29 background-color: var(--button--color-background); 30 border-radius: var(--button--border-radius); 31 border: var(--button--border-width) solid var(--button--color-background); 30 line-height: var(--button--line-height); 31 padding: var(--button--padding-vertical) var(--button--padding-horizontal); 32 32 text-decoration: none; 33 padding: var(--button--padding-vertical) var(--button--padding-horizontal);34 33 35 &:focus { 36 background: transparent; 37 outline-offset: -6px; 38 outline: 2px dotted currentColor; 34 // Standard Button Color Relationship Logic 35 &:not(:hover):not(:active) { 39 36 40 .is-dark-theme & { 41 color: var(--button--color-background); 37 // Text colors 38 &:not(.has-text-color) { 39 color: var(--global--color-background); 40 41 // Nested 42 .has-background & { 43 color: var(--local--color-background, var(--global--color-primary)); 44 45 &.has-background { 46 color: var(--global--color-primary); 47 } 48 } 42 49 } 43 50 51 // Background-colors 44 52 &:not(.has-background) { 45 color: var(--button--color-text-hover); 53 background-color: var(--global--color-primary); 54 55 // Nested 56 .has-background & { 57 background-color: var(--local--color-primary, var(--global--color-primary)); 58 } 46 59 } 47 60 } 48 61 62 // Hover Button color should match parent element foreground color 63 &:hover, 64 &:active { 65 background-color: transparent; 66 border-color: currentColor; 67 color: inherit; 68 } 69 70 // Focus Button outline color should always match the current text color 71 &:focus { 72 outline-offset: -6px; 73 outline: 2px dotted currentColor; 74 } 75 76 // Disabled Button colors 49 77 &:disabled { 50 78 background-color: var(--global--color-white-50);
Note: See TracChangeset
for help on using the changeset viewer.