The div that looks different in every browser
It’s not that Martijn Cuppens used User Agent sniffing, CSS hacks, or anything like that to make this quirk div. This is just a plain ol’ <div> using the outline property a la:
div {
inset 100px green;
outline-offset: -125px;
}
It looks different in different browsers because browsers literally render something differently in this strange situation.
I happened upon Reddit user spidermonk33’s comment in which they animated the offset to understand it a bit more. I took that …
The post The div that looks different in every browser appeared first on CSS-Tricks.
Scrolling Gradient
If you want a gradient that changes as you scroll down a very long page, you can create a gradient with a bunch of color stops, apply it to the body and it will do just that.
But, what if you don’t want a perfectly vertical gradient? Like you want just the top left corner to change color? Mike Riethmuller, re-using his own technique from the CSS-only scroll indicator (A-grade CSS trickery), did this by overlapping two gradients. The “top” …
The post Scrolling Gradient appeared first on CSS-Tricks.
Anatomy of a malicious script: how a website can take over your browser
By now, we all know that the major tech behemoths like Facebook or Google know everything about our lives, including how often we go to the bathroom (hence all the prostate medication ads that keep popping up, even on reputable news sites). After all, we’ve given them permission to do so, by reading pages and pages of legalese in their T&C pages (we all did, didn’t we?) and clicking on the “Accept” button.
But what can a site do to …
The post Anatomy of a malicious script: how a website can take over your browser appeared first on CSS-Tricks.
70+ Corporate & Creative Business Card PSD Mockup Templates
Array Launches Free Gutenberg-Ready Atomic Blocks Theme on WordPress.org
Torque Toons: The “Try Gutenberg” Release Schedule
The post Torque Toons: The “Try Gutenberg” Release Schedule appeared first on Torque.
15 of the Best WordPress Themes For Travel Websites
The post 15 of the Best WordPress Themes For Travel Websites appeared first on Torque.
Design Systems at GitHub
Here’s a nifty post by Diana Mounter all about the design systems team at GitHub that details how the team was formed, the problems they’ve faced and how they’ve adapted along the way:
When I started working at GitHub in late 2015, I noticed that there were many undocumented patterns, I had to write a lot of new CSS to implement designs, and that there weren’t obvious underlying systems connecting all the pieces together. I knew things could be better …
The post Design Systems at GitHub appeared first on CSS-Tricks.




