larsejaas.com
Creating UI using React, TypeScript and/or whatever gets the job done.
Let's connect!
Especially on mobile devices.
Prefetcing and prerendering can really help a lot!
Especially on mobile devices.
Prefetcing and prerendering can really help a lot!
The view transition API is soo nice!
Been playing a lot around with this on my own page as well - makes the look and feel of multi-page apps/pages sooooo much nicer! 😍 🥳
The view transition API is soo nice!
Been playing a lot around with this on my own page as well - makes the look and feel of multi-page apps/pages sooooo much nicer! 😍 🥳
I better start off with something simpler than the blur-background - this one is quite a bit more complex - but I also get this weird blink of "no blur" on my header menu on desktop.
I better start off with something simpler than the blur-background - this one is quite a bit more complex - but I also get this weird blink of "no blur" on my header menu on desktop.
larsejaas.com/about/cyclin...
and then navigate to the next image using the arrow-buttons.
larsejaas.com/about/cyclin...
and then navigate to the next image using the arrow-buttons.
I would like my blur background to look like it persists across navigation to a different URL - I just haven't found a way to do this yet...
I would like my blur background to look like it persists across navigation to a different URL - I just haven't found a way to do this yet...
So, I ended up adding a style tag manually in the top of my head where the cascade layers are defined. This works well 🙂
So, I ended up adding a style tag manually in the top of my head where the cascade layers are defined. This works well 🙂
Makes sense!
I am in Astro actually - but prefer CSS Modules over <style> tags - totally a personal preference...
But your info here on local/global scope could have helped me out!
Maybe include info about view-transition-class here also 💡😀
Makes sense!
I am in Astro actually - but prefer CSS Modules over <style> tags - totally a personal preference...
But your info here on local/global scope could have helped me out!
Maybe include info about view-transition-class here also 💡😀
Most of the time, you’ll want to keep styles local, but sometimes it’s useful to reference global classes, IDs, or states.
You can combine local and global selectors with the global keyword.
Here, `.someLocalClass` remains local, but its style adapts to a global state.
Most of the time, you’ll want to keep styles local, but sometimes it’s useful to reference global classes, IDs, or states.
You can combine local and global selectors with the global keyword.
Here, `.someLocalClass` remains local, but its style adapts to a global state.
If you want full type safety in TypeScript, you can generate `.d.ts` files for your CSS Modules.
A package like typed-css-modules github.com/Quramy/typed... can do this automatically for all modules.
Now classnames will be typed, avoiding typos and giving you editor autocompletion.
If you want full type safety in TypeScript, you can generate `.d.ts` files for your CSS Modules.
A package like typed-css-modules github.com/Quramy/typed... can do this automatically for all modules.
Now classnames will be typed, avoiding typos and giving you editor autocompletion.
Wrap all component styles in the `components` cascade layer.
Anything outside cascade layers has higher specificity.
This makes it easier to override component styles from the outside when needed.
Wrap all component styles in the `components` cascade layer.
Anything outside cascade layers has higher specificity.
This makes it easier to override component styles from the outside when needed.
CSS Modules let you import from other `.module.css` files — even keyframes!
The import syntax allows for renaming the keyframe animations - or use them as-is.
Now you can use the animation as if it were local.
CSS Modules let you import from other `.module.css` files — even keyframes!
The import syntax allows for renaming the keyframe animations - or use them as-is.
Now you can use the animation as if it were local.
You can “spread” one class into another using `composes`.
Works a bit like Sass mixins but stays inside the CSS Modules ecosystem.
You can “spread” one class into another using `composes`.
Works a bit like Sass mixins but stays inside the CSS Modules ecosystem.
CSS Modules are often paired with Sass, but native CSS now supports nested selectors in all modern browsers, making Sass less essential.
If you previously relied on Sass mixins for reusable styles, you can often achieve the same with reusable classes using `composes`.
CSS Modules are often paired with Sass, but native CSS now supports nested selectors in all modern browsers, making Sass less essential.
If you previously relied on Sass mixins for reusable styles, you can often achieve the same with reusable classes using `composes`.
Number 14? I would love to take a stab at an issue if I might be of help!
I still have a thing that bothers me with transparent layers with a background blur filter applied 🤔
Number 14? I would love to take a stab at an issue if I might be of help!
I still have a thing that bothers me with transparent layers with a background blur filter applied 🤔
animation-duration: 1s;
}
it will fail!
I have to use this syntax:
::view-transition-image-pair(:global(.test-class)) {
animation-duration: 1s;
}
So now it works 🕺
view-transition-classes must be globally scoped!
animation-duration: 1s;
}
it will fail!
I have to use this syntax:
::view-transition-image-pair(:global(.test-class)) {
animation-duration: 1s;
}
So now it works 🕺
view-transition-classes must be globally scoped!