Changeset 49987 for trunk/src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/button/_style.scss
- Timestamp:
- 01/20/2021 05:49:28 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/button/_style.scss
r49574 r49987 5 5 input[type="submit"], 6 6 input[type="reset"], 7 .wp-block-search__button, 8 .wp-block-button .wp-block-button__link { 7 .wp-block-search .wp-block-search__button, 8 .wp-block-button .wp-block-button__link, 9 .wp-block-file a.wp-block-file__button { 9 10 // Extend button style 10 11 @include button-style(); 11 }12 13 .site .button,14 input[type="submit"],15 input[type="reset"],16 .wp-block-search .wp-block-search__button,17 .wp-block-file .wp-block-file__button {18 19 &:active {20 color: var(--button--color-text-active);21 background-color: var(--button--color-background-active);22 }23 24 &:hover {25 color: var(--button--color-text-hover);26 background: transparent;27 }28 12 } 29 13 … … 36 20 &:not(.is-style-outline) { 37 21 38 .wp-block-button__link {22 .wp-block-button__link:not(:hover):not(:active) { 39 23 40 &:active { 41 color: var(--button--color-text-active) !important; 42 background: transparent !important; 43 border-color: var(--button--color-background); 24 // Text colors 25 &:not(.has-text-color) { 26 color: var(--global--color-background); 27 28 // Nested 29 .has-background & { 30 color: var(--local--color-background, var(--global--color-background)); 31 32 &.has-background { 33 color: var(--global--color-primary); 34 } 35 } 44 36 } 45 37 46 &:hover { 47 color: var(--button--color-text-hover) !important; 48 background: transparent !important; 49 border-color: var(--button--color-background); 38 // Background-colors 39 &:not(.has-background) { 40 background-color: var(--global--color-primary); 41 42 // Nested 43 .has-background & { 44 background-color: var(--local--color-primary, var(--global--color-primary)); 45 } 50 46 } 47 } 51 48 52 &:focus { 53 color: var(--button--color-text) !important; 54 background: var(--button--color-background) !important; 55 } 49 // Hover Button color should match parent element foreground color 50 .wp-block-button__link:hover, 51 .wp-block-button__link:active { 52 border-color: currentColor !important; 53 background-color: transparent !important; 54 color: inherit !important; 56 55 } 57 56 } … … 60 59 &.is-style-outline { 61 60 62 .wp-block-button__link { 63 padding: var(--button--padding-vertical) var(--button--padding-horizontal); 61 .wp-block-button__link:not(:hover):not(:active) { 64 62 65 &:not(.has-background) { 66 background: transparent; 63 // Border colors 64 &:not(.has-text-color), 65 &:not(.has-background), 66 &.has-background { 67 border-color: currentColor; 67 68 } 68 69 69 &:not(.has-background):not(.has-text-color) { 70 background: transparent; 71 color: var(--button--color-background); 72 border-color: var(--button--color-background); 73 } 70 // Text colors 71 &:not(.has-text-color) { 72 color: var(--global--color-primary); 74 73 75 &.has-background:not(.has-text-color) { 76 color: currentColor; 77 } 78 79 &.has-background.has-gray-background-color:not(.has-text-color), 80 &.has-background.has-dark-gray-background-color:not(.has-text-color), 81 &.has-background.has-black-background-color:not(.has-text-color) { 82 color: var(--global--color-white); 83 } 84 85 .is-dark-theme & { 86 87 &:not(.has-text-color) { 88 89 &.has-background { 90 color: var(--global--color-dark-gray); 91 } 92 93 &.has-background.has-gray-background-color, 94 &.has-background.has-dark-gray-background-color, 95 &.has-background.has-black-background-color { 96 color: var(--global--color-white); 97 } 74 // Nested 75 .has-background & { 76 color: var(--local--color-primary, var(--global--color-primary)); 98 77 } 99 78 } 100 79 101 &.has-text-color, 102 &.has-background.has-text-color { 103 border-color: currentColor; 104 } 105 106 &:active, 107 &:hover { 108 color: var(--button--color-text) !important; 109 background: var(--button--color-background) !important; 110 border-color: var(--button--color-background); 111 112 &.has-text-color { 113 border-color: var(--button--color-background); 80 &.has-background { 81 // Nested 82 .has-background &:not(.has-text-color) { 83 color: inherit; 114 84 } 115 85 } 116 86 117 &:focus { 118 color: var(--button--color-background) !important; 119 background: transparent !important; 87 // Background-colors 88 &:not(.has-background) { 89 background-color: transparent; 90 } 91 } 92 93 .wp-block-button__link:hover, 94 .wp-block-button__link:active { 95 96 border-color: transparent !important; 97 background-color: var(--global--color-primary) !important; 98 color: var(--global--color-background) !important; 99 100 .has-background & { 101 background-color: var(--local--color-primary, var(--global--color-primary)) !important; 102 color: var(--local--color-background, var(--global--color-background)) !important; 103 } 104 105 .has-text-color & { 106 color: var(--local--color-background, var(--global--color-background)) !important; 120 107 } 121 108 }
Note: See TracChangeset
for help on using the changeset viewer.