Newer
Older
@function px2rem($size)
$remSize: $size / 16
@return #{$remSize}rem
@function pxr2rem($size)
$remSize: $size / 16 / 2
@return #{$remSize}rem
@mixin in-page-with-aside
@content
@mixin in-page-without-aside
main > .blocks &,
text-decoration-color: rgba($link-color, 0.3)
text-decoration-line: underline
text-decoration-thickness: 1px
text-underline-offset: 3px
transition: text-decoration-color .3s ease
&:hover
text-decoration-color: rgba($link-color, 1)
text-decoration-thickness: 1px
@mixin hover-translate-icon($pseudo: after, $distance: 10)
&::#{$pseudo}
transition: transform 0.55s $arrow-ease-transition
transform: translateX(0)
&:hover
&::#{$pseudo}
transform: translateX(#{px2rem($distance)})
@mixin sticky($top-md: $header-height-md, $top-sm: $header-height)
html:not(.is-scrolling-down) &
top: $top-sm
@include media-breakpoint-up(md)
top: $top-md
@mixin icon($icon-name: '', $pseudo-element: before, $font-size: px2rem(10))
font-style: normal
font-variant: normal
font-weight: normal
line-height: 1
speak: never
text-transform: none
vertical-align: middle
@include media-breakpoint-up(md)
padding-left: $grid-gutter
padding-right: $grid-gutter
@mixin grid($cols: 12, $breakpoint: false, $gap-y: $grid-gutter/2)
@if $breakpoint
@include media-breakpoint-up($breakpoint)
display: grid
@function col($nb, $base: 12)
$nb: $nb/$base * 12
$nbCol: calc( (100% + #{$grid-gutter}) / 12 * #{$nb} )
@return #{$nbCol}
@mixin stretched-link($pseudo-element: after)
&::#{$pseudo-element}
bottom: 0
@mixin aspect-ratio($width, $height, $selector: 'iframe', $background: false)
@if $background
display: block
width: 100%
@supports not (aspect-ratio: 1)
position: relative
&::before
content: ''
padding-top: ($height / $width) * 100%
width: 100%
#{$selector}
bottom: 0
left: 0
position: absolute
right: 0
top: 0
position: relative
display: flex
flex-direction: column
.media
@include aspect-ratio(2, 1, 'img', $background)
margin-bottom: $spacing1
order: -1
overflow: hidden
.title
margin-bottom: px2rem(5)
a
@include stretched-link
p
margin-bottom: 0
margin-top: 0
@mixin visually-hidden
clip: rect(0,0,0,0) !important
border: 0 !important
height: 1px !important
margin: -1px !important
overflow: hidden !important
padding: 0 !important
position: absolute !important
white-space: nowrap !important
width: 1px !important
outline: 0
@mixin list-reset
list-style: none
padding-left: 0
@mixin inset($top: 0, $right: $top, $bottom: $top, $left: $top)
inset: $top $right $bottom $left
// polyfill for inset
@supports not (inset: $top)
bottom: $bottom
left: $left
right: $right