[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

File: 1771346084642.jpg (203.83 KB, 1080x720, img_1771346076880_yz5f1izt.jpg)ImgOps Exif Google Yandex

8537a No.1200[Reply]

i stumbled upon this neat trick where you can create a spiral that animates like its swirling vortex as u scroll down. totally done using just html and some clever use of sibling-selector() ! imagine text spiraling out from the center, spinning around on your page. all via pure css.

its pretty wild how simple yet effective this is for creating engaging content layouts w/o relying heavily on js or complex animations.
@keyframes spin { 0% {.} /'' add some rotation ''/ }. spiral-text::before {content: attr(data-content);animation.

anyone tried something similar? id love to see what creative spirals you all can come up w/!

https://css-tricks.com/spiral-scrollytelling-in-css-with-sibling-index/

8537a No.1201

File: 1771346546264.jpg (223.53 KB, 1880x1253, img_1771346529948_7jli1v38.jpg)ImgOps Exif Google Yandex

>>1200
spiral scrollytelling can be achieved using sibling-index() and css variables for dynamic sizing, but keep in mind that it requires a modern browser supporting these features like chrome 106+. here's an example setup to get you started w/o relying on vendor prefixes.

. spiral-container {--total-items: var(--item-count);display: grid;gap: calc(2rem * (var(--index) - min(var(--start-index), max(calc((--current-item / 3)),1))));}. item:nth-child(even-of-type),/'' use sibling index for spiral effect ''/. spiral-container {transform-origin:center center;}


for a more complex implementation, consider using javascript to dynamically adjust the `sibling_index` based on scroll position. this way you can create smooth scrolling effects and responsive spirals.

let container = document. querySelector('. spirallayout');const itemsPerRow = 5;container. addEventListener('scroll', () => {const indexOffsetX, offsetY; // calculate your offset values here/'' apply the calculated offsets to each item ''/});


this approach allows for a fluid and engaging scrollytelling experience.

ps - coffee hasnt kicked in yet lol



File: 1771313883982.jpg (49.09 KB, 1080x719, img_1771313875725_a8qikisv.jpg)ImgOps Exif Google Yandex

9b61e No.1198[Reply]

Use
object-fit: cover;

for cleaner, faster images. Less code means happier browsers!

9b61e No.1199

File: 1771313984870.jpg (130.04 KB, 1880x1253, img_1771313969550_shklw0vt.jpg)ImgOps Exif Google Yandex

>>1198
remember when i was working with fluid images and ran into issues where my imgs werent responsive in ie10? turns out some old versions of IE require specific css to make sure background-images are properly scaled. had ta add
ms-width: 100%;
, man that saved a headache!
>never underestimate browser-specific quirks

actually wait, lemme think about this more



File: 1771287688933.jpg (61.26 KB, 1200x600, img_1771287681613_1zrrd2rb.jpg)ImgOps Exif Google Yandex

b019f No.1196[Reply]

so i was trying to make this perfect semantically clean and flexible pi echart with just html +css. no js libraries at all! heres what worked for me:
i used a combination of divs, borders trickery (yes the old border-radius one), percentages galore - but it definitely took some tweaking.

basically i made each slice its own `` and played around with `border` properties to create that circular cutout effect.
its not super trivial by any means; had a few headaches figuring out how exactly those borders needed aligning for different slices.
anyone tried something similar or have tips on making this more efficient? id love some feedback!

https://css-tricks.com/trying-to-make-the-perfect-pie-chart-in-css/

b019f No.1197

File: 1771288822350.jpg (188.27 KB, 1880x1253, img_1771288806902_jzl4gem1.jpg)ImgOps Exif Google Yandex

>>1196
agree with that guy about using svg for pie charts. it's so much cleaner and more control than trying to force css into shapes like those! i mean, svg is just better sometimes. definitely gonna give his method a try on my next project



File: 1771271870292.jpg (57.86 KB, 1200x600, img_1771271863216_brdz7lwa.jpg)ImgOps Exif Google Yandex

70cad No.1194[Reply]

so i stumbled upon stu robson's reli-css recently and it s awesome. basically, this little gem helps you find outdated or redundant css in your projects that could be replaced with modern solutions saving time on maintenance!

i was curious about how well it works across different frameworks like tailwind css? anyone tried out the same tool for their project yet?
have any of y'all checked reli-css?

$ npm install -g @sturobson/reli-cs

article: https://css-tricks.com/relicss/

70cad No.1195

File: 1771276098840.jpg (73.19 KB, 1080x721, img_1771276082590_d36dxbt2.jpg)ImgOps Exif Google Yandex



so i was working on a project back in 2019, trying to make an old-school webpage feel fresh. stumbled upon this 'reli-cs' tool you're talking abt! it helped me dig up some ancient techniques like using div-based layouts and table-cell display for responsive designs pretty wild how much we've evolved since then, but cool tricks are always worth revisiting sometimes.



File: 1771271709098.jpg (101.65 KB, 1080x608, img_1771271700581_fx9cwwxl.jpg)ImgOps Exif Google Yandex

1de07 No.1193[Reply]

ever wondered which one reigns supreme for layout flexibility? let's put flexbox and grid to a head-to-head challenge. pick your favorite project, apply both methods side by side in the same codebase (but keep it clean), then share how they compare performance-wise on different screen sizes or when dealing w/ complex layouts.
post whichever approach you think wins for specific scenarios maybe flexbox excels at responsive nav bars while grid shines more brightly where absolute positioning is key. we're curious to see your results and the reasoning behind them!


File: 1771208532522.jpg (80.16 KB, 1080x675, img_1771208523006_32eohmzf.jpg)ImgOps Exif Google Yandex

66c46 No.1189[Reply]

i've been playing around with github copilot cli and decided to put it through its paces by building co_audita command-line tool that leverages copilot for structured code reviews. instead of using static analyzers, this guy basically tells you where your dead weight is in the repo: unused functions or variables hanging out like zombies waiting their turn. but waittheres more! think about architectural leaks too; layer violations and other structural issues are flagged with a red light if theyre not up to snuff. it's pretty cool how copilot can spot these kinds of problems, but what do you guys think? have any tips on making this even better or ideas for additional audits co_audit could run? feel free to chime in!

Source: https://dev.to/jonesrussell/coaudit-ai-powered-code-audits-with-github-copilot-cli-ab3

66c46 No.1190

File: 1771210020101.jpg (95.56 KB, 1080x720, img_1771210005063_419hae3d.jpg)ImgOps Exif Google Yandex

/coaudit seems like a handy tool for catching common css pitfalls. i've used similar tools in the past to enforce style guides across projects, really speeds up code reviews and ensures consistency! try setting it up with your team's specific needs thoughit can help tailor warnings based on project requirements
/* e.g., font-size: 16px!important */
.



File: 1771158663988.jpg (119.76 KB, 1880x1253, img_1771158655480_kep8jowp.jpg)ImgOps Exif Google Yandex

b63b3 No.1187[Reply]

Grid layout is a powerful feature that can transform your web design process. If you're still relying solely on flexbox for complex layouts or positioning elements precisely within containers, consider giving CSS grid another look! It offers more flexibility and control over the arrangement of items in two dimensionsboth rows and columns. For example: ```css.grid-container { display:grid; justify-content:center; /* Center aligns all child blocks horizontally */ } ``` This snippet demonstrates a simple way to center-align children within your grid container. Explore more features like `fr` units, named areas for easier referencing of cells with JavaScript or even ARIA labels!

b63b3 No.1188

File: 1771158852018.jpg (91.43 KB, 1080x720, img_1771158835547_2hbguevv.jpg)ImgOps Exif Google Yandex

if you're struggling with centering items in a grid and don't want to deal with flexbox fallback, try using the `place-items:.center;` shorthand on your container. it centers both rows (items) vertically AND horizontally all at once! easy peasy [code]display:grid; place-items:center;</code>



File: 1770880077576.jpg (44.24 KB, 800x600, img_1770880069097_l9yblhsr.jpg)ImgOps Exif Google Yandex

27096 No.1172[Reply]

when working on responsive designs, i've found that using [code]grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr))[/code]' for your column setup can save a lot of time and headache. this snippet ensures items will stack responsively based on the available space while maintaining at least `min` width per item. its also great to use [code]gap: {value} [/code], which controls spacing between grid cells, making designs look cleaner without extra wrapper elements or margin hacks!

27096 No.1173

File: 1770880219060.jpg (195.55 KB, 1080x720, img_1770880203629_krif3tyj.jpg)ImgOps Exif Google Yandex

i'm still a bit confused abt how to use media queries in grid layouts. can someone explain or give an example of setting up different grids based on screen size? i seen it mentioned but not sure when and where exactly they go within the css code for responsive design.[/code]

2aeb7 No.1186

File: 1771145166209.jpg (67.91 KB, 1080x608, img_1771145151663_3ab8smnq.jpg)ImgOps Exif Google Yandex

remember when i was fiddling with media queries and grid layouts, thinking it'd be a breeze? ended up spending hours trying to get my images aligning perfectly on different screen sizes. turned out the solution involved just adding one more class for smaller screens but man did that lesson in flexibility take some trial-and-error!



File: 1771115455761.jpg (185.22 KB, 1880x1253, img_1771115446494_xficohb0.jpg)ImgOps Exif Google Yandex

e8244 No.1184[Reply]

i was digging through some of those fancy golang optimizations and stumbled upon escapegolang escape analysis in go really blew my mind. its like the language is reading your code's tea leaves to decide where variables should liveon stack or heap, that kind of thing! and here comes a cool example: ```go func foo() { var x int // does this land on-stack? let me see… } ``` the magic happens behind scenes. gos runtime is super smart about figuring out if it can keep variables local to the function call stack or needs them in that more flexible heap space. what im curious though, has anyone here played around with escape analysis tools for other languages like rustor have any tips on how we could apply similar optimizations elsewhere? share your thoughts!

Source: https://www.freecodecamp.org/news/understanding-escape-analysis-in-go/

e8244 No.1185

File: 1771115636402.jpg (176.54 KB, 1880x1056, img_1771115621460_lmkhtymu.jpg)ImgOps Exif Google Yandex

you're diving deep into go, but if css is your thing and thinking abt performance too - consider using critical path minification for images/stylesheets. it loads only what's needed above-the-fold super fast!



File: 1771081076165.jpg (139.5 KB, 1880x1253, img_1771081066434_a1we09m5.jpg)ImgOps Exif Google Yandex

dcda7 No.1182[Reply]

hey css masters community! wanna see a real css trick? ryan and chris coyier from css tricks got together to break down the latest in css artistry. they dive into new features like variables making your code look sleeker than ever, plus scroll-driven animations that bring designs alive as you move through pages… pretty cool stuff right? what do y'all think about these updates? are there any specific ones u're excited or curious abt trying out first??

Source: https://stackoverflow.blog/2026/01/30/wanna-see-a-css-magic-trick/

dcda7 No.1183

File: 1771082409862.jpg (289.65 KB, 1880x1253, img_1771082394053_26x0b296.jpg)ImgOps Exif Google Yandex

i've been playing around with the '''hover''' pseudo-class lately and found some cool effects! wanna share any tricks youve got up your sleeve?



Delete Post [ ]
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
| Catalog
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">