Search

Nalezeno "Sass": 21

Popular Online Game Accused Of Profiting Off Of Child Gambling


Roblox has long been accused of not doing enough to make sure its massively popular gaming platform is free of toxicity and exploitation. Now parents are joining together in a class-action lawsuit to take the $17 billion company to court over allegations that it gets children into online gambling...

How I Made an Icon System Out of CSS Custom Properties


SVG is the best format for icons on a website, there is no doubt about that. It allows you to have sharp icons no matter the screen pixel density, you can change the styles of the SVG on hover … How I Made an Icon System Out of CSS Custom Properties originally published on CSS-Tricks, which...

A Practical Tip For Using Sass Default Parameters


Sass offers functions and mixins that accept parameters. You can use Sass default parameters, that is, parameters that have a value even if you don’t provide them when the function or mixin is called. Let’s focus on mixins here. … A Practical Tip For Using Sass Default...

How I Made a Generator for SVG Loaders With Sass and SMIL Options


While learning Vue.js, I started building free web tools that involved the exploration of SVG, with the goal of learning something about both! Let’s take a look at one of those tools: a generator that makes SVG loaders and … The post How I Made a Generator for SVG Loaders With Sass and SMIL...

Trigonometry in CSS and JavaScript: Introduction to Trigonometry


In this series of articles we’ll get an overview of trigonometry, understand how it can be useful, and delve into some creative applications in CSS and JavaScript. The post Trigonometry in CSS and JavaScript: Introduction to Trigonometry appeared first on Codrops

Creating Stylesheet Feature Flags With Sass !default


!default is a Sass flag that indicates conditional assignment to a variable — it assigns a value only if the variable was previously undefined or null. Consider this code snippet: $variable: 'test' !default; To the Sass compiler, this line … The post Creating Stylesheet Feature Flags With...

Comparing Styling Methods in 2020


Over on Smashing, Adebiyi Adedotun Lukman covers all these styling methods. It’s in the context of Next.js, which is somewhat important as Next.js has some specific ways you work with these tools, is React and, thus, is a components-based architecture. But the styling methods talked about...

When Sass and New CSS Features Collide


Recently, CSS has added a lot of new cool features such as custom properties and new functions. While these things can make our lives a lot easier, they can also end up interacting with preprocessors, like Sass, in funny ways. So this is going to be a post about the issues I’ve encountered...

Making My Netlify Build Run Sass


Let’s say you wanted to build a site with Eleventy as the generator. Popular choice these days! Eleventy doesn’t have some particularly blessed way of preprocessing your CSS, if that’s something you want to do. There are a variety of ways to do it and perhaps that freedom is part...

How to Tame Line Height in CSS


In CSS, line-height is probably one of the most misunderstood, yet commonly-used attributes. As designers and developers, when we think about line-height, we might think about the concept of leading from print design — a term, interestingly enough, that comes from literally putting pieces of lead...

Getting JavaScript to Talk to CSS and Sass


JavaScript and CSS have lived beside one another for upwards of 20 years. And yet it’s been remarkably tough to share data between them. There have been large attempts, sure. But, I have something simple and intuitive in mind — something not involving a structural change, but rather putting...

Sass !default and themeable design systems


This is a great blog post from Brad Frost where he walks us through an interesting example. Let’s say we’re making a theme and we have some Sass like this: .c-text-input { background-color: $form-background-color; padding: 10px } If the $form-background-color variable isn’t defined then...

A Handy Sass-Powered Tool for Making Balanced Color Palettes


For those who may not come from a design background, selecting a color palette is often based on personal preferences. Choosing colors might be done with an online color tool, sampling from an image, "borrowing" from favorite brands, or just sort of randomly picking from a color wheel until...

Introducing Sass Modules


Sass just launched a major new feature you might recognize from other languages: a module system. This is a big step forward for @import. one of the most-used Sass-features. While the current @import rule allows you to pull in third-party packages, and split your Sass into manageable "partials,"...

A Proof of Concept for Making Sass Faster


At the start of a new project, Sass compilation happens in the blink of an eye. This feels great, especially when it’s paired with Browsersync, which reloads the stylesheet for us in the browser. But, as the amount of Sass grows, compilation time increases. This is far from ideal. It can be a real...

Creating a Maintainable Icon System with Sass


One of my favorite ways of adding icons to a site is by including them as data URL background images to pseudo-elements (e.g. ::after) in my CSS. This technique offers several advantages: They don't require any additional HTTP requests other than the CSS file. Using the background-size property...

Staggered CSS Transitions


Let's say you wanted to move an element on :hover for a fun visual effect. @media (hover: hover) { .list--item { transition: 0.1s; transform: translateY(10px); } .list--item:hover, .list--item:focus { transform: translateY(0); } } Cool cool. But what if you had several list...

Do CSS Custom Properties Beat Sass Loops?


I reckon that a lot of our uses of Sass maps can be replaced with CSS Custom properties – but hear me out for a sec. When designing components we often need to use the same structure of a component but change its background or text color based on a theme. For example, in an alert, we might need...

Where Do You Nest Your Sass Breakpoints?


I love nesting my @media query breakpoints. It's perhaps the most important feature of Sass to me. Maybe I pick a method and do it like this: .element { display: grid; grid-template-columns: 100px 1fr; @include breakpoint(baby-bear) { display: block; } } That's straightforward enough....

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace