Don’t hesitate to contact us if you have any feedback.

Tag: CSS variables

  • SCSS – Font Family variables for streamlined styling

    SCSS – Font Family variables for streamlined styling

    Managing typography across a website can be a complex task, especially when dealing with multiple font families. The SCSS snippet below sets up a system of variables for font families, making it easy to maintain and update fonts throughout your site’s stylesheets. Defining Font Family Variables This SCSS map $fonts defines a series of font…

    Read more

  • SCSS – Flexible Animation

    SCSS – Flexible Animation

    In modern web development, animations play a key role in enhancing user experience and interactivity. The SCSS snippet provided allows developers to create a highly flexible and customizable fade-in animation using CSS variables within keyframes. Keyframe Definition with Customizable Variables This @keyframes rule, named fadeFromBottom, defines a vertical fade-in animation. The animation starts with the…

    Read more

  • JavaScript – Set Scrollbar Size as a CSS Variable

    JavaScript – Set Scrollbar Size as a CSS Variable

    Managing layout shifts and space allocation in web design can be tricky when considering the variable size of scrollbars across different browsers and operating systems. This JavaScript function, dynamically calculates the size of the scrollbar and sets it as a CSS custom property, making it easier to handle layout adjustments. Function Overview The function putScrollbarSizeInCSSVariable…

    Read more