2022-04-29 13:36:54 +02:00
|
|
|
// ==========================================================================
|
|
|
|
|
// Objects / SVG Icons
|
|
|
|
|
// ==========================================================================
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 17:13:35 +02:00
|
|
|
// Markup
|
|
|
|
|
//
|
|
|
|
|
// 1. If icon is accessible and has a title
|
|
|
|
|
// 2. If icon is decorative
|
|
|
|
|
//
|
|
|
|
|
// <i class="o-icon ${modifier}">
|
|
|
|
|
// <svg
|
|
|
|
|
// class="svg-${icon-name}"
|
|
|
|
|
// xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
// role="img" [1]
|
|
|
|
|
// aria-hidden="true" [2]
|
|
|
|
|
// focusable="false" [2]
|
|
|
|
|
// aria-labelledby="${id}" [1]
|
|
|
|
|
// >
|
|
|
|
|
// <title id="${id}"> [1]
|
|
|
|
|
// Locomotive
|
|
|
|
|
// </title>
|
|
|
|
|
// <use xlink:href="assets/images/sprite.svg#${icon-name}" xmlns:xlink="http://www.w3.org/1999/xlink"/>
|
|
|
|
|
// </svg>
|
|
|
|
|
// </i>
|
|
|
|
|
|
2022-04-29 13:36:54 +02:00
|
|
|
// Global styles for icones
|
|
|
|
|
// ==========================================================================
|
|
|
|
|
|
|
|
|
|
.o-icon {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
|
|
|
|
svg {
|
2023-04-05 14:40:28 +02:00
|
|
|
--icon-height: calc(var(--icon-width) * math.div(1, (var(--icon-ratio))));
|
2022-04-29 13:36:54 +02:00
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
|
width: var(--icon-width);
|
|
|
|
|
height: var(--icon-height);
|
|
|
|
|
fill: currentColor;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// SVG sizes
|
|
|
|
|
// ==========================================================================
|
|
|
|
|
|
2022-05-25 17:13:35 +02:00
|
|
|
// // Logo
|
|
|
|
|
// .svg-logo {
|
|
|
|
|
// --icon-width: #{rem(100px)};
|
2024-01-29 15:17:50 -05:00
|
|
|
// --icon-ratio: math.div(20, 30); // width/height based on svg viewBox
|
2022-04-29 13:36:54 +02:00
|
|
|
|
2022-05-25 17:13:35 +02:00
|
|
|
// // Sizes
|
|
|
|
|
// .o-icon.-big & {
|
|
|
|
|
// --icon-width: #{rem(200px)};
|
|
|
|
|
// }
|
|
|
|
|
// }
|
2022-04-29 13:36:54 +02:00
|
|
|
|