π Whatβs new in CSS 2023
#css
β οΈ Experimental (not fully supported)
β Article link: https://medium.com/@trinhcamminh25112002/whats-new-in-css-and-ui-i-o-2023-edition-5bac2c7271bb
π Code Link:
1.
2.
3.
#css
β οΈ Experimental (not fully supported)
β Article link: https://medium.com/@trinhcamminh25112002/whats-new-in-css-and-ui-i-o-2023-edition-5bac2c7271bb
1.
@container: https://codepen.io/web-dot-dev/pen/KKxzYQx2.
new nth-child: https://codepen.io/web-dot-dev/pen/oNMRaQq3.
@scope: https://codepen.io/web-dot-dev/pen/MWPVGPLPlease open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
π Binding CSS Variables in Angular
#angular #directive #css_variables
β Article Link: https://netbasal.com/binding-css-variables-in-angular-69dfd4136e21
π Code Link: https://gist.github.com/NetanelBasal/8abfd1dc1ce85bdc41ee0d9fd41d0781#file-css-var-4-ts
#angular #directive #css_variables
β Article Link: https://netbasal.com/binding-css-variables-in-angular-69dfd4136e21
Please open Telegram to view this post
VIEW IN TELEGRAM
π1
CSS functions
#css #min #max #clamp
β Article link: https://medium.com/@jwood206/css-min-max-and-clamp-845f7a5c3af9
π Example: https://jsfiddle.net/70gt3jpc/
min() max() clamp() #css #min #max #clamp
β Article link: https://medium.com/@jwood206/css-min-max-and-clamp-845f7a5c3af9
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯1
π 10 Powerful CSS Properties
#css #scroll #scrollbar #cursor #supports #mask #filter #backdrop
β Article link: https://medium.com/@anirudh.munipalli/10-powerful-css-properties-that-every-web-developer-must-know-e5d7f8f04e10
#css #scroll #scrollbar #cursor #supports #mask #filter #backdrop
β Article link: https://medium.com/@anirudh.munipalli/10-powerful-css-properties-that-every-web-developer-must-know-e5d7f8f04e10
π1
π§ͺ CSS Preview: Defining Your CSS Scope with @scope
#css #scope
β Article link: https://medium.com/@weijunext/css-preview-defining-your-css-scope-with-scope-47914ab319d3
#css #scope
β Article link: https://medium.com/@weijunext/css-preview-defining-your-css-scope-with-scope-47914ab319d3
π2
π CSS variables in Angular: ng-deep is no longer needed
#angular #css #ngDeep
β Article link: https://medium.com/@maks-dolgikh/css-variables-in-angular-ng-deep-is-no-longer-needed-part-2-3ac60f8a4abc
#angular #css #ngDeep
β Article link: https://medium.com/@maks-dolgikh/css-variables-in-angular-ng-deep-is-no-longer-needed-part-2-3ac60f8a4abc
π Passing CSS variables to Angular child +
#angular #css #has
β Article link: https://medium.com/@bebrasmell/passing-css-variables-to-angular-child-7465646166eb
:has#angular #css #has
β Article link: https://medium.com/@bebrasmell/passing-css-variables-to-angular-child-7465646166eb
This media is not supported in your browser
VIEW IN TELEGRAM
π Defining Animation Keyframes with
#css #keyframes
@keyframes#css #keyframes
The modern CSS standard offers two solutions for creating smooth animations for DOM elements:
1. Switching CSS property values smoothly based on user interactions with the transition property.
2. Implementing keyframes-based advanced animations using the animation property.
The second approach requires defining keyframes, so the @keyframes at-rule. Look at the following example:
<div class="board">CSS</div>
@keyframes board-anim {
0%, 85%, 100% {
filter: blur(0px);
}
90% {
filter: blur(5px) contrast(200%);
}
}
.board {
padding: 12px 50px;
font-size: 24px;
font-weight: bold;
background-color: #ff9d00;
color: #222;
display: inline-block;
animation: board-anim 3s infinite linear;
}This media is not supported in your browser
VIEW IN TELEGRAM
π Modifying Printed Page Layouts with
#css #page
@page#css #page
Sometimes, users need to print web pages on physical papers for offline use. Also, some users print web pages as PDF documents to save for future use. Some web apps offer server-based features to generate paper-friendly PDF documents, but you can also print any web page using the browserβs native printing feature.
The `page` CSS at-rule offers a way to customize page dimensions, orientation, and margins of printed pages without affecting the visible browser viewport. For example, the following CSS snippet sets a 1-inch margin and A4 landscape size for printed pages:
@page {
size: A4 landscape;
margin: 1in;
}This at-rule comes with `:first`, `:blank`, `:left`, and `:right` pseudo-classes to select specific pages of the printed document. Browse the official MDN documentation to learn more details about `page`.
π2
π Defining Custom List Styles with
#css #counterStyle
@counter-style#css #counterStyle
We often use ordered and unordered lists in HTML documents. For customizing them, standard browsers offer various inbuilt list marker types via the list-style-type CSS property. You can extend these list styles or implement custom styles from scratch with the @counter-style at-rule.
Look at the following CSS code snippet:
@counter-style emojis {
system: cyclic;
symbols: π΄ π π’;
suffix: ' ';
}
ul li {
list-style-type: emojis;
}Moreover, itβs possible to customize existing inbuilt list styles with this at-rule:
@counter-style decimal-mod {
system: extends decimal;
prefix: '( ';
suffix: ' ): ';
pad: 2 '0';
}
ol li {
list-style-type: decimal-mod;
margin-bottom: 2px;
}
ol li::marker {
color: #780794;
}The above CSS definition extends the default decimal list style by adding a prefix, suffix, and zero-padding.
This media is not supported in your browser
VIEW IN TELEGRAM
π
#css #startingStyle
Adding Initial DOM Rendering Transitions with @starting-style#css #startingStyle
When a DOM element gets rendered from an HTML document or JavaScript code snippet, it gets rendered without any initial transition animation. In the past, we typically implemented these initial animations with dynamically switched CSS classes via JavaScript. Nowadays, we can use CSS animations for these situations, but the initial animation concept undoubtedly belongs to the CSS transitions feature. The `starting-style` at-rule lets you set initial styles for a CSS selector, so you can build up a transition animation for the initial rendering step:
button {
padding: 12px;
border: none;
border-radius: 4px;
font-size: 16px;
background-color: #bbb;
opacity: 1;
transform: scale(1);
transition: all 1s linear;
@starting-style {
opacity: 0;
transform: scale(0.5);
}
}
The above code snippet plays a transition animation when a button element gets rendered on the viewport. This transition works even though you dynamically create a new element with JavaScript.
π2