2020-05-29 10:16:33 +00:00
|
|
|
$fontSizes: (
|
|
|
|
"smaller": 0.75,
|
|
|
|
"small": 0.875,
|
|
|
|
"regular": 1,
|
|
|
|
"large": 1.25,
|
|
|
|
"larger": 2,
|
|
|
|
);
|
|
|
|
|
2021-09-02 09:44:25 +00:00
|
|
|
// Maps a named font-size to its predefined size. Units default to em, but can
|
|
|
|
// be changed using the multiplier parameter.
|
|
|
|
@mixin font-size($sizeName, $multiplier: 1em) {
|
2022-03-28 13:00:20 +00:00
|
|
|
font-size: map.get($fontSizes, $sizeName) * $multiplier;
|
2018-11-21 16:33:21 +00:00
|
|
|
}
|
|
|
|
|
2021-12-13 13:57:59 +00:00
|
|
|
@keyframes spinner__animation {
|
2019-08-15 14:55:57 +00:00
|
|
|
0% {
|
2021-12-13 13:57:59 +00:00
|
|
|
animation-timing-function: cubic-bezier(0.5856, 0.0703, 0.4143, 0.9297);
|
|
|
|
transform: rotate(0deg);
|
2019-08-15 14:55:57 +00:00
|
|
|
}
|
2021-12-13 13:57:59 +00:00
|
|
|
100% {
|
|
|
|
transform: rotate(360deg);
|
2019-08-15 14:55:57 +00:00
|
|
|
}
|
2021-12-13 13:57:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes loading__animation {
|
2019-08-15 14:55:57 +00:00
|
|
|
100% {
|
2021-12-13 13:57:59 +00:00
|
|
|
transform: translateX(100%);
|
2019-08-15 14:55:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-11-21 16:33:21 +00:00
|
|
|
// Adds animation to placeholder section
|
2022-02-28 17:41:10 +00:00
|
|
|
@mixin placeholder($include-border-radius: true) {
|
2020-11-23 19:21:36 +00:00
|
|
|
outline: 0 !important;
|
|
|
|
border: 0 !important;
|
2022-11-15 21:08:44 +00:00
|
|
|
background-color: currentColor !important;
|
|
|
|
color: currentColor !important;
|
2021-12-13 13:57:59 +00:00
|
|
|
width: 100%;
|
2022-02-28 17:41:10 +00:00
|
|
|
@if $include-border-radius == true {
|
|
|
|
border-radius: 0.25rem;
|
|
|
|
}
|
2021-12-13 13:57:59 +00:00
|
|
|
display: block;
|
|
|
|
line-height: 1;
|
|
|
|
position: relative !important;
|
|
|
|
overflow: hidden !important;
|
|
|
|
max-width: 100% !important;
|
2020-02-26 15:49:07 +00:00
|
|
|
pointer-events: none;
|
2021-12-13 13:57:59 +00:00
|
|
|
box-shadow: none;
|
|
|
|
z-index: 1; /* Necessary for overflow: hidden to work correctly in Safari */
|
2022-11-15 21:08:44 +00:00
|
|
|
opacity: 0.15;
|
2018-11-21 16:33:21 +00:00
|
|
|
|
2020-02-26 15:49:07 +00:00
|
|
|
// Forces direct descendants to keep layout but lose visibility.
|
|
|
|
> * {
|
|
|
|
visibility: hidden;
|
2018-11-21 16:33:21 +00:00
|
|
|
}
|
2019-08-15 14:55:57 +00:00
|
|
|
|
2021-12-13 13:57:59 +00:00
|
|
|
&::after {
|
|
|
|
content: " ";
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
height: 100%;
|
|
|
|
background-repeat: no-repeat;
|
2022-11-15 21:08:44 +00:00
|
|
|
background-image: linear-gradient(90deg, currentColor, #f5f5f54d, currentColor);
|
2021-12-13 13:57:59 +00:00
|
|
|
transform: translateX(-100%);
|
|
|
|
animation: loading__animation 1.5s ease-in-out infinite;
|
|
|
|
}
|
|
|
|
|
2019-08-15 14:55:57 +00:00
|
|
|
@media screen and (prefers-reduced-motion: reduce) {
|
|
|
|
animation: none;
|
|
|
|
}
|
2018-11-21 16:33:21 +00:00
|
|
|
}
|
|
|
|
|
2020-02-26 15:49:07 +00:00
|
|
|
@mixin force-content() {
|
2021-12-13 13:57:59 +00:00
|
|
|
&::before {
|
2020-02-26 15:49:07 +00:00
|
|
|
content: "\00a0";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-07 08:48:38 +00:00
|
|
|
// Hide an element from sighted users, but available to screen reader users.
|
2018-11-29 18:10:08 +00:00
|
|
|
@mixin visually-hidden() {
|
2020-12-17 19:05:17 +00:00
|
|
|
border: 0;
|
2018-11-29 18:10:08 +00:00
|
|
|
clip: rect(1px, 1px, 1px, 1px);
|
|
|
|
clip-path: inset(50%);
|
|
|
|
height: 1px;
|
|
|
|
width: 1px;
|
|
|
|
margin: -1px;
|
|
|
|
overflow: hidden;
|
|
|
|
/* Many screen reader and browser combinations announce broken words as they would appear visually. */
|
2018-11-30 21:37:58 +00:00
|
|
|
overflow-wrap: normal !important;
|
2018-11-29 18:10:08 +00:00
|
|
|
word-wrap: normal !important;
|
2020-12-17 19:05:17 +00:00
|
|
|
padding: 0;
|
|
|
|
position: absolute !important;
|
|
|
|
width: 1px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin visually-hidden-focus-reveal() {
|
|
|
|
background-color: #fff;
|
|
|
|
border-radius: 3px;
|
|
|
|
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
|
|
|
|
clip: auto !important;
|
|
|
|
clip-path: none;
|
|
|
|
color: $input-text-active;
|
|
|
|
display: block;
|
|
|
|
font-size: 0.875rem;
|
|
|
|
font-weight: 700;
|
|
|
|
height: auto;
|
|
|
|
left: 5px;
|
|
|
|
line-height: normal;
|
|
|
|
padding: 15px 23px 14px;
|
|
|
|
text-decoration: none;
|
|
|
|
top: 5px;
|
|
|
|
width: auto;
|
|
|
|
z-index: 100000;
|
2018-11-29 18:10:08 +00:00
|
|
|
}
|
2018-11-30 21:37:58 +00:00
|
|
|
|
2020-05-14 09:07:21 +00:00
|
|
|
@mixin reset-box() {
|
2020-01-17 13:46:56 +00:00
|
|
|
border: 0;
|
2020-04-14 11:43:10 +00:00
|
|
|
border-radius: 0;
|
2020-05-14 09:07:21 +00:00
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
vertical-align: baseline;
|
|
|
|
}
|
2020-01-17 13:46:56 +00:00
|
|
|
|
2020-05-14 09:07:21 +00:00
|
|
|
@mixin reset-typography() {
|
|
|
|
color: inherit;
|
2020-04-14 11:43:10 +00:00
|
|
|
font-family: inherit;
|
2020-01-17 13:46:56 +00:00
|
|
|
font-size: inherit;
|
2020-06-05 10:00:19 +00:00
|
|
|
font-style: inherit;
|
2020-04-14 11:43:10 +00:00
|
|
|
font-weight: inherit;
|
|
|
|
letter-spacing: inherit;
|
2020-05-14 09:07:21 +00:00
|
|
|
line-height: inherit;
|
|
|
|
text-decoration: inherit;
|
|
|
|
text-transform: inherit;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reset <h1>, <h2>, etc. styles as if they were text. Useful for elements that must be headings for a11y but don't need those styles.
|
|
|
|
@mixin text-heading() {
|
|
|
|
@include reset-box();
|
|
|
|
@include reset-typography();
|
|
|
|
box-shadow: none;
|
|
|
|
display: inline;
|
2020-01-17 13:46:56 +00:00
|
|
|
|
|
|
|
background: transparent;
|
2020-05-14 09:07:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Reset <button> style as if it was text. Useful for elements that must be `<button>` for a11y but don't need those styles.
|
|
|
|
@mixin text-button() {
|
|
|
|
@include reset-box();
|
|
|
|
@include reset-typography();
|
|
|
|
background: transparent;
|
|
|
|
box-shadow: none;
|
|
|
|
display: inline;
|
2021-02-17 12:40:52 +00:00
|
|
|
text-shadow: none;
|
2020-05-14 09:07:21 +00:00
|
|
|
|
2020-04-14 11:43:10 +00:00
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active {
|
2020-01-17 13:46:56 +00:00
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
}
|
2020-04-24 12:23:25 +00:00
|
|
|
|
2020-05-14 09:07:21 +00:00
|
|
|
// Reset <button> style so we can use link style for action buttons.
|
|
|
|
@mixin link-button() {
|
|
|
|
@include text-button();
|
2022-10-10 17:26:15 +00:00
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reset <button> style so we can use link style for action buttons in filter blocks
|
|
|
|
@mixin filter-link-button() {
|
|
|
|
@include link-button();
|
2022-10-10 14:39:32 +00:00
|
|
|
@include font-size(small);
|
2020-05-14 09:07:21 +00:00
|
|
|
text-decoration: underline;
|
2022-10-10 14:39:32 +00:00
|
|
|
font-weight: normal;
|
|
|
|
color: inherit;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
color: inherit;
|
|
|
|
}
|
2020-05-14 09:07:21 +00:00
|
|
|
}
|
|
|
|
|
2020-04-24 12:23:25 +00:00
|
|
|
// Makes sure long words are broken if they overflow the container.
|
2020-05-07 08:48:38 +00:00
|
|
|
@mixin wrap-break-word() {
|
2020-04-24 12:23:25 +00:00
|
|
|
// This is the current standard, works in most browsers.
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
// Safari supports word-break.
|
|
|
|
word-break: break-word;
|
|
|
|
// IE11 doesn't support overflow-wrap neither word-break: break-word, so we fallback to -ms-work-break: break-all.
|
|
|
|
-ms-word-break: break-all;
|
|
|
|
}
|
2020-04-30 10:18:12 +00:00
|
|
|
|
2022-05-19 16:16:46 +00:00
|
|
|
// Add support for content alignment classes
|
|
|
|
@mixin with-alignment {
|
|
|
|
// Apply max-width to floated items that have no intrinsic width
|
|
|
|
&.alignleft,
|
|
|
|
&.alignright {
|
|
|
|
max-width: $content-width * 0.5;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Using flexbox without an assigned height property breaks vertical center alignment in IE11.
|
|
|
|
// Appending an empty ::after element tricks IE11 into giving the cover image an implicit height, which sidesteps this issue.
|
|
|
|
&::after {
|
|
|
|
display: block;
|
|
|
|
content: "";
|
|
|
|
font-size: 0;
|
|
|
|
min-height: inherit;
|
|
|
|
|
|
|
|
// IE doesn't support flex so omit that.
|
|
|
|
@supports (position: sticky) {
|
|
|
|
content: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Aligned cover blocks should not use our global alignment rules
|
|
|
|
&.aligncenter,
|
|
|
|
&.alignleft,
|
|
|
|
&.alignright {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Shows an semi-transparent overlay
|
|
|
|
@mixin with-background-dim($opacity: 0.5) {
|
|
|
|
&.has-background-dim {
|
|
|
|
.background-dim__overlay::before {
|
|
|
|
content: "";
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
right: 0;
|
2022-05-24 14:10:16 +00:00
|
|
|
background: inherit;
|
2022-05-19 16:16:46 +00:00
|
|
|
border-radius: inherit;
|
|
|
|
opacity: $opacity;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@for $i from 1 through 10 {
|
|
|
|
&.has-background-dim-#{ $i * 10 } .background-dim__overlay::before {
|
|
|
|
opacity: $i * 0.1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-23 10:13:53 +00:00
|
|
|
// Shows a border with the current color and a custom opacity. That can't be achieved
|
|
|
|
// with normal border because `currentColor` doesn't allow tweaking the opacity, and
|
|
|
|
// setting the opacity of the entire element would change the children's opacity too.
|
|
|
|
@mixin with-translucent-border($border-width: 1px, $opacity: 0.3) {
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
border-style: solid;
|
|
|
|
border-width: $border-width;
|
|
|
|
bottom: 0;
|
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
left: 0;
|
|
|
|
opacity: $opacity;
|
|
|
|
pointer-events: none;
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-01 08:04:52 +00:00
|
|
|
// Wraps the content with a media query specially targeting IE11.
|
|
|
|
@mixin ie11() {
|
|
|
|
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-12 15:16:00 +00:00
|
|
|
// Positions an element absolutely and stretches it over the container
|
|
|
|
@mixin absolute-stretch() {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
2020-05-29 10:16:33 +00:00
|
|
|
// Converts a px unit to em.
|
|
|
|
@function em($size, $base: 16px) {
|
2021-08-24 11:37:43 +00:00
|
|
|
@return math.div($size, $base) * 1em;
|
2020-04-30 10:18:12 +00:00
|
|
|
}
|
2020-10-22 10:40:32 +00:00
|
|
|
|
|
|
|
// Encodes hex colors so they can be used in URL content.
|
|
|
|
@function encode-color($color) {
|
2022-03-28 13:00:20 +00:00
|
|
|
@if type-of($color) != "color" or string.index(#{$color}, "#") != 1 {
|
2020-10-22 10:40:32 +00:00
|
|
|
@return $color;
|
|
|
|
}
|
|
|
|
|
2022-03-28 13:00:20 +00:00
|
|
|
$hex: string.slice(color.ie-hex-str($color), 4);
|
2020-10-22 10:40:32 +00:00
|
|
|
@return "%23" + unquote("#{$hex}");
|
|
|
|
}
|