Changeset 43892 for branches/5.0/src/wp-content/themes/twentynineteen/sass/site/header/_site-featured-image.scss
- Timestamp:
- 11/12/2018 11:19:13 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-content/themes/twentynineteen/sass/site/header/_site-featured-image.scss
r43860 r43892 2 2 3 3 .site-header.featured-image { 4 5 /* Hide overflow for overflowing featured image */ 6 overflow: hidden; 4 7 5 8 /* Need relative positioning to properly align layers. */ … … 7 10 8 11 /* Add text shadow to text, to increase readability. */ 9 text-shadow: 0 1px 2px rgba( black, 0.35);12 text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); 10 13 11 14 /* Set white text color when featured image is set. */ … … 55 58 .site-featured-image svg { 56 59 /* Use -webkit- only if supporting: Chrome < 54, iOS < 9.3, Android < 4.4.4 */ 57 -webkit-filter: drop-shadow(0 1px 2px rgba( black, 0.35) );58 filter: drop-shadow(0 1px 2px rgba( black, 0.35) );60 -webkit-filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35) ); 61 filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35) ); 59 62 } 60 63 61 64 /* Entry header */ 62 63 .site-featured-image .entry-header { 64 margin-top: calc( 4 * #{$size__spacing-unit}); 65 margin-bottom: 0; 66 margin-left: 0; 67 margin-right: 0; 68 69 @include media (tablet) { 70 71 margin-left: calc(2 * (100vw / 12)); 72 margin-right: calc(2 * (100vw / 12)); 73 } 74 75 .entry-title { 76 77 &:before { 78 background: $color__background-body; 79 } 80 } 81 82 /* Entry meta */ 83 84 .entry-meta { 85 86 font-weight: 500; 87 88 > span { 89 90 margin-right: $size__spacing-unit; 91 display: inline-block; 92 93 &:last-child { 94 margin-right: 0; 95 } 96 } 97 98 a { 99 100 @include link-transition; 101 color: currentColor; 102 103 &:hover { 104 text-decoration: none; 105 } 106 } 107 108 .svg-icon { 109 position: relative; 110 display: inline-block; 111 vertical-align: middle; 112 margin-right: 0.5em; 113 } 114 115 .discussion-avatar-list { 116 display: none; 117 } 118 } 119 120 &.has-discussion { 65 .site-featured-image { 66 67 /* First layer: grayscale. */ 68 .post-thumbnail img { 69 height: auto; 70 left: 50%; 71 max-width: 1000%; 72 min-height: 100%; 73 min-width: 100vw; 74 position: absolute; 75 top: 50%; 76 transform: translateX(-50%) translateY(-50%); 77 width: auto; 78 z-index: 1; 79 80 @supports ( object-fit: cover ) { 81 height: 100%; 82 left: 0; 83 object-fit: cover; 84 top: 0; 85 transform: none; 86 width: 100%; 87 } 88 89 /* When image filters are active, make it grayscale to colorize it blue. */ 90 .image-filters-enabled & { 91 filter: grayscale(100%); 92 } 93 } 94 95 .entry-header { 96 97 margin-top: calc( 4 * #{$size__spacing-unit}); 98 margin-bottom: 0; 99 margin-left: 0; 100 margin-right: 0; 121 101 122 102 @include media (tablet) { 123 103 124 .entry-meta { 125 display: flex; 104 margin-left: $size__site-margins; 105 margin-right: $size__site-margins; 106 } 107 108 .entry-title { 109 110 &:before { 111 background: $color__background-body; 112 } 113 } 114 115 /* Entry meta */ 116 117 .entry-meta { 118 119 font-weight: 500; 120 121 > span { 122 123 margin-right: $size__spacing-unit; 124 display: inline-block; 125 126 &:last-child { 127 margin-right: 0; 128 } 129 } 130 131 a { 132 133 @include link-transition; 134 color: currentColor; 135 136 &:hover { 137 text-decoration: none; 138 } 139 } 140 141 .svg-icon { 126 142 position: relative; 127 } 128 129 .entry-title { 130 padding-right: calc(1 * (100vw / 12) + #{$size__spacing-unit}); 131 } 132 133 .entry-meta .comment-count { 134 position: absolute; 135 right: 0; 136 } 137 138 .entry-meta .discussion-avatar-list { 139 display: block; 140 position: absolute; 141 bottom: 100%; 143 display: inline-block; 144 vertical-align: middle; 145 margin-right: 0.5em; 146 } 147 148 .discussion-avatar-list { 149 display: none; 150 } 151 } 152 153 &.has-discussion { 154 155 @include media (tablet) { 156 157 .entry-meta { 158 display: flex; 159 position: relative; 160 } 161 162 .entry-title { 163 padding-right: calc(1 * (100vw / 12) + #{$size__spacing-unit}); 164 } 165 166 .entry-meta .comment-count { 167 position: absolute; 168 right: 0; 169 } 170 171 .entry-meta .discussion-avatar-list { 172 display: block; 173 position: absolute; 174 bottom: 100%; 175 } 142 176 } 143 177 } … … 171 205 172 206 /* Set up image filter layer positioning */ 173 .site-branding-container:before,174 207 .site-branding-container:after, 175 208 .site-featured-image:before, … … 185 218 186 219 /* Background & Effects */ 187 /* Shared background settings between pseudo elements. See .site-branding-container*/220 /* Shared background settings between pseudo elements. */ 188 221 background-position: center; 189 222 background-repeat: no-repeat; … … 191 224 192 225 /* The intensity of each blend mode is controlled via layer opacity. */ 193 194 /* First layer: grayscale. */195 .site-branding-container:before {196 background-position: center;197 background-repeat: no-repeat;198 background-size: cover;199 z-index: 1;200 201 /* When image filters are active, make it grayscale to colorize it blue. */202 .image-filters-enabled & {203 filter: grayscale(100%);204 }205 }206 226 207 227 /* Second layer: screen. */ … … 213 233 214 234 /* Third layer: multiply. */ 215 216 235 /* When image filters are inactive, a black overlay is added. */ 236 .site-featured-image:after { 217 237 background: #000; 218 238 mix-blend-mode: multiply; … … 234 254 /* Fourth layer: overlay. */ 235 255 .image-filters-enabled & .site-branding-container:after { 236 background: rgba( #000, 0.35);256 background: rgba(0, 0, 0, 0.35); 237 257 mix-blend-mode: overlay; 238 258 opacity: 0.5; … … 253 273 */ 254 274 transition: opacity 1200ms ease-in-out; 255 275 opacity: 0.7; 256 276 z-index: 5; 257 277
Note: See TracChangeset
for help on using the changeset viewer.