// vf-box @import 'package.variables.scss'; // Debug information from component's `package.json`: // --- /*! * Component: #{map-get($componentInfo, 'name')} * Version: #{map-get($componentInfo, 'version')} * Location: #{map-get($componentInfo, 'location')} */ @import 'vf-box.variables.scss'; .vf-box { --box-text-color: var( --vf-box-theme-color--foreground, var(--vf-theme-color--foreground, #{ui-color(black)})); --box-background-color: var(--vf-box-theme-color--background, var(--vf-theme-color--background, #{ui-color(white)})); --vf-box-padding: var(--vf-box-padding--override, #{map-get($vf-spacing-map, vf-spacing--400)}); background-color: ui-color(white); background-color: var(--box-background-color); box-sizing: border-box; color: ui-color(black); color: var(--box-text-color); display: block; padding: 1rem; padding: var(--vf-box-padding); width: 100%; // the last element within the component shouldn't have a bottom margin & > :last-child { margin-bottom: 0; } } .vf-box--is-link { position: relative; text-decoration: none; transition-duration: 250ms; transition-property: box-shadow; transition-timing-function: ease-in-out; &:hover { box-shadow: 0 0 4px 4px rgba(0, 0, 0, .2); transition-duration: 250ms; transition-property: box-shadow; transition-timing-function: ease-in-out; } } .vf-box__heading { // @include set-type(text-heading--4); // replaced for 2020 homepage updates @include set-type(text-heading--3, $color: ignore); } .vf-box__link { color: currentColor; text-decoration: none; &::after { bottom: 0; content: ''; left: 0; position: absolute; right: 0; top: 0; transition-duration: 300ms; transition-property: box-shadow; transition-timing-function: ease-in-out; z-index: set-layer(vf-z-index--box-link); } } .vf-box__text { @include set-type(text-body--3, $color: ignore); // some times there's a link inside the text in old WP posts. // the vf-box might also be inside of `vf-content` .vf-content & a, a { color: currentColor; position: relative; text-decoration: underline; z-index: set-layer(vf-z-index--box-text-link); &:visited, &:hover, &:focus { color: currentColor; } } } .vf-box--400 { --vf-box-padding: #{map-get($vf-spacing-map, vf-spacing--400)}; } .vf-box--600 { --vf-box-padding: #{map-get($vf-spacing-map, vf-spacing--600)}; } .vf-box--800 { --vf-box-padding: #{map-get($vf-spacing-map, vf-spacing--800)}; } .vf-box--easy { --box-text-color: var(--vf-box-theme-color--background, var(--vf-theme-color--background)); --box-background-color: #{ui-color(white)}; border-bottom: 4px solid; // added for 2020 homepage updates .vf-box__text { color: #{ui-color(black)}; } } .vf-box--normal { --box-text-color: var(--vf-box-theme-color--foreground, var(--vf-theme-color--foreground, #{ui-color(white)})); --box-background-color: var(--vf-box-theme-color--background, var(--vf-theme-color--background, #{ui-color(black)})); } .vf-box-theme--primary { --vf-box-theme-color--foreground: #{ui-color(white)}; --vf-box-theme-color--background: #{theme(vf-theme--primary)}; } .vf-box-theme--secondary { --vf-box-theme-color--foreground: #{ui-color(black)}; --vf-box-theme-color--background: #{theme(vf-theme--secondary)}; } .vf-box-theme--tertiary { --vf-box-theme-color--foreground: #{ui-color(white)}; --vf-box-theme-color--background: #{theme(vf-theme--tertiary)}; } .vf-box-theme--quaternary { --vf-box-theme-color--foreground: #{ui-color(black)}; --vf-box-theme-color--background: #{theme(vf-theme--quaternary)}; } .vf-box-theme--quinary { --vf-box-theme-color--background: #{theme(vf-theme--quinary)}; --vf-box-theme-color--foreground: #{ui-color(black)}; } .vf-box--rounded { border-radius: 8px; } .vf-box--outline { background-color: transparent; border-style: solid; border-width: 2px; }