Did You Know About the :has CSS Selector?
File this under stuff you don’t need to know just yet, but I think the :has
CSS selector is going to have a big impact on how we write CSS in the future. In fact, if it ever ships in …
File this under stuff you don’t need to know just yet, but I think the :has
CSS selector is going to have a big impact on how we write CSS in the future. In fact, if it ever ships in …
/* Only show invalid ring while not focused */
input:not(:focus):not(:placeholder-shown):invalid {
border-color: var(--color-invalid);
}
input:not(:focus):not(:placeholder-shown):invalid ~ .error-message {
display: block;
}
/* Only show valid ring while not focused and if a value is entered */
/* :empty won't work
… In this week’s news, Chrome tackles focus rings, we learn how to get “donut” scope, Global Privacy Control gets big-name adoption, it’s time to ditch pixels in media queries, and a snippet that prevents annoying form validation styling.…
Hey, we’re back with weekly updates about the browser landscape from Šime Vidas.
In this week’s update, the CSS :not
pseudo class can accept complex selectors, how to disable smooth scrolling when using “Find on page…” in Chrome, Safari’s …
Say you want to select an element when it doesn’t have a certain class. That’s what the :not()
selector is for.
body:not(.home) {
}
But what if there are multiple classes you want to avoid?…
CSS is designed in a way that allows for relatively seamless addition of new features. Since the dawn of the language, specifications have required browsers to gracefully ignore any properties, values, selectors, or at-rules they do not support. Consequently, in …
The :not()
property in CSS is a negation pseudo class and accepts a simple selector or a selector list as an argument. It matches an element that is not represented by the argument. The passed argument may not contain additional …
Frontend Masters is the best place to get it. They have courses on all the most important front-end technologies, from React to CSS, from Vue to D3, and beyond with Node.js and Full Stack.