<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/write-better-css-with-modern-css-koxruasm0" -->

---
title: Write better CSS with modern CSS | daily.dev
description: Learn how to write better CSS with modern CSS features that can help optimize your code and reduce redundancy.
canonical: https://daily.dev/posts/write-better-css-with-modern-css-koxruasm0
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Write better CSS with modern CSS | daily.dev
og:description: Learn how to write better CSS with modern CSS features that can help optimize your code and reduce redundancy.
og:url: https://daily.dev/posts/write-better-css-with-modern-css-koxruasm0
og:image: https://api.daily.dev/og/posts/KOxRUasm0.png
og:image:alt: Write better CSS with modern CSS
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Write better CSS with modern CSS

**[CSS Tip](https://daily.dev/sources/csstip)** · 1 min read · 1055 upvotes · 42 comments

## Summary

Learn how to write better CSS with modern CSS features that can help optimize your code and reduce redundancy.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://css-tip.com/better-modern-css/>

## Community discussion

Top comments from developers on daily.dev.

**@mahmoudelagamy** · 10 upvotes

> CSS Nesting still not supported on mobile browsers, so i avoid using it

**@wasifdev** · 3 upvotes

> How??

**@orcdev** · 3 upvotes

> I'm somehow more focused on learning modern CSS frameworks these days.
>
> Not saying people shouldn't learn CSS first to have a good foundation though.

**@tharindumadhushan** · 2 upvotes

> Good

**@aiaman** · 1 upvotes

> humm.., Helpful! 🙌

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/write-better-css-with-modern-css-koxruasm0)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Write better CSS with modern CSS","url":"https://daily.dev/posts/write-better-css-with-modern-css-koxruasm0","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/write-better-css-with-modern-css-koxruasm0"},"datePublished":"2024-04-24T09:54:02.567Z","dateModified":"2024-05-09T09:19:01.209Z","description":"Learn how to write better CSS with modern CSS features that can help optimize your code and reduce redundancy.","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c14bcb1d0c338690a5b9a9fec3be15cc?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c14bcb1d0c338690a5b9a9fec3be15cc?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"CSS Tip","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"CSS Tip","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/5d335233e7894c2ea997aa89e1724200","url":"https://daily.dev/sources/csstip"},"commentCount":42,"discussionUrl":"https://daily.dev/posts/write-better-css-with-modern-css-koxruasm0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1055},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":42}],"keywords":"webdev,css","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"CSS Tip","item":"https://daily.dev/sources/csstip"},{"@type":"ListItem","position":3,"name":"Write better CSS with modern CSS"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/write-better-css-with-modern-css-koxruasm0","comment":[{"@type":"Comment","text":"CSS Nesting still not supported on mobile browsers, so i avoid using it","datePublished":"2024-04-25T11:52:14.525Z","url":"https://daily.dev/posts/KOxRUasm0#c-haXfzFxsP","author":{"@type":"Person","name":"Mahmoud Elagamy","url":"https://daily.dev/mahmoudelagamy","image":"https://media.daily.dev/image/upload/s--RNCK4V2O--/f_auto/v1716648693/avatars/avatar_5YuV59RChJ2NzMZELw3BT"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":10}},{"@type":"Comment","text":"How??","datePublished":"2024-04-24T12:04:23.103Z","url":"https://daily.dev/posts/KOxRUasm0#c-uTvOqI5I3","author":{"@type":"Person","name":"Wasif.Dev","url":"https://daily.dev/wasifdev","image":"https://media.daily.dev/image/upload/s--O0TOmw4y--/f_auto/v1715772965/public/noProfile"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"I’m somehow more focused on learning modern CSS frameworks these days.\nNot saying people shouldn’t learn CSS first to have a good foundation though.","datePublished":"2024-04-25T19:50:27.225Z","url":"https://daily.dev/posts/KOxRUasm0#c-tSHLTvwDG","author":{"@type":"Person","name":"OrcDev","url":"https://daily.dev/orcdev","image":"https://avatars.githubusercontent.com/u/7549148?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Good","datePublished":"2024-04-25T04:14:31.603Z","url":"https://daily.dev/posts/KOxRUasm0#c-0Aj3hHcTz","author":{"@type":"Person","name":"Tharindu Madhushan","url":"https://daily.dev/tharindumadhushan","image":"https://lh3.googleusercontent.com/a/ACg8ocJZs9x7vUPd5rB29Vw26eq55VRIDjfNu806cFLgqRFcqJK4Flc=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"humm…, Helpful! 🙌","datePublished":"2024-05-16T05:08:40.377Z","url":"https://daily.dev/posts/KOxRUasm0#c-E7i3pRaLR","author":{"@type":"Person","name":"Ai Aman","url":"https://daily.dev/aiaman","image":"https://media.daily.dev/image/upload/s--B1oOlZfc--/f_auto/v1715491411/avatars/avatar_ORcB8reLSce4chiMs4slN"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

