{"id":74193,"date":"2025-11-28T21:00:03","date_gmt":"2025-11-28T13:00:03","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=74193"},"modified":"2025-11-21T16:27:09","modified_gmt":"2025-11-21T08:27:09","slug":"modern-css-features","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/","title":{"rendered":"10 Modern CSS Features You Can Use Today"},"content":{"rendered":"<p>CSS has come a long way. We once relied on preprocessors like <a href=\"https:\/\/sass-lang.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Sass<\/a> or JavaScript hacks just to do basic things like use variables, nest selectors, or build flexible layouts. These tools worked, but they often added extra setup, slower builds, and more complexity than we\u2019d like.<\/p>\n<p>Today many of these features are built right into the language. In this article, we\u2019ll look at ten modern CSS features you can start using right now to write simpler, more powerful, and more responsive styles without relying on extra tools.<\/p>\n<hr>\n<h2>1. Container Queries<\/h2>\n<p>In the past, responsive design relied entirely on <code>@media<\/code> queries, which only reacted to the size of the entire browser window. This caused headaches when reusing components. For example, a component that looked perfect in one place could easily break when moved into a smaller container.<\/p>\n<p>This is the problem that <strong>Container Queries<\/strong> can solve.<\/p>\n<p>So, instead of depending on the whole viewport, elements can now respond to the size of their parent container. This means each component can style itself based on where it\u2019s placed. By setting <code>container-type: inline-size;<\/code> or <code>container-type: size;<\/code> on a parent element, you can use <code>@container<\/code> rules to apply styles that fit perfectly in context.<\/p>\n<p>Here\u2019s an example of how to use <strong><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/CSS_containment\/Container_queries\" target=\"_blank\" rel=\"noopener noreferrer\">Container Queries<\/a><\/strong> where we either hide or show an image when the container is at a specific size:<\/p>\n<figure>\n    <iframe src=\"https:\/\/codesandbox.io\/embed\/z8nj84?view=editor&module=%2Fstyles.css\" style=\"width:100%; height: 380px; border:0; border-radius: 4px; overflow:hidden;\" title=\"css-container-queries\" allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\" sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"><\/iframe>\n  <\/figure>\n<hr>\n<h2>2. CSS Nesting<\/h2>\n<p>Writing CSS used to mean repeating the same selectors over and over, making stylesheets long and messy. CSS Nesting fixes this by allowing you to write rules inside each other, similar to how you would in <a href=\"https:\/\/sass-lang.com\" target=\"_blank\" rel=\"noopener noreferrer\">Sass or SCSS<\/a>. It keeps your code shorter and cleaner.<\/p>\n<p>You can nest selectors directly inside the parent\u2019s braces, and use <code>&<\/code> when referring to the parent, like <code>& + p<\/code> or <code>&.active<\/code>. This feature makes preprocessors like Sass unnecessary for nesting.<\/p>\n<figure>\n    <iframe src=\"https:\/\/codesandbox.io\/embed\/zpd477?view=editor&module=%2Fstyles.css\" style=\"width:100%; height: 380px; border:0; border-radius: 4px; overflow:hidden;\" title=\"css-nesting\" allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\" sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"><\/iframe>\n  <\/figure>\n<hr>\n<h2>3. CSS Parent Selector<\/h2>\n<p>For years, CSS could only style elements from the top down. There was no way to target a parent based on what\u2019s inside it. The new <code>:has()<\/code>, often called the \u201cparent selector\u201d, changes that.<\/p>\n<p>The <code>:has()<\/code> selector allows you to style an element if it contains something specific.<\/p>\n<p>For example, you can style a card differently if it has an image, or highlight a parent container when one of its inputs is focused. It even works with <code>:not()<\/code> for more advanced logic, like styling every grid item except those with images.<\/p>\n<p>For example:<\/p>\n<figure>\n    <iframe src=\"https:\/\/codesandbox.io\/embed\/dw5p3k?view=editor+%2B+preview&module=%2Fstyles.css&hidenavigation=1\" style=\"width:100%; height: 380px; border:0; border-radius: 4px; overflow:hidden;\" title=\"css-parent-selector\" allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\" sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"><\/iframe>\n  <\/figure>\n<hr>\n<h2>4. CSS Fluid Sizing<\/h2>\n<p>CSS <code>clamp()<\/code>, <code>min()<\/code>, and <code>max()<\/code> functions enable fluid sizing, which allows elements to scale smoothly between sizes, creating a more natural and adaptable design.<\/p>\n<p>With <code>clamp()<\/code>, you can define a value that automatically adjusts between a minimum and maximum size all in one line. For example, <code>font-size: clamp(1rem, 2vw, 2rem);<\/code> will allow text to grow naturally with the screen width, but never get smaller than <code>1rem<\/code> or larger than <code>2rem<\/code>.<\/p>\n<p>You can also use <code>min()<\/code> and <code>max()<\/code> to cap or floor values, such as <code>width: min(90%, 800px);<\/code> will make the element 90% wide, but never exceed <code>800px<\/code>.<\/p>\n<p>For example:<\/p>\n<figure>\n    <iframe src=\"https:\/\/codesandbox.io\/embed\/rmjsf7?view=editor&module=%2Fstyles.css&hidenavigation=1\" style=\"width:100%; height: 380px; border:0; border-radius: 4px; overflow:hidden;\" title=\"css-fluid-sizing\" allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\" sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"><\/iframe>\n  <\/figure>\n<hr>\n<h2>5. CSS Subgrid<\/h2>\n<p>CSS Grid changed how we build layouts, but nested grids used to work independently, making it tricky to align items inside child grids with the main grid above them.<\/p>\n<p>Subgrid fixes this by allowing child grids to inherit the parent grid\u2019s track sizes, gaps, and line names. You can set <code>display: grid;<\/code> and use <code>grid-template-columns: subgrid;<\/code> or <code>grid-template-rows: subgrid;<\/code>.<\/p>\n<p>In the following example, we use subgrid to align all prices perfectly, regardless of content height above it.<\/p>\n<figure>\n    <iframe src=\"https:\/\/codesandbox.io\/embed\/cmvlzr?view=editor&module=%2Fstyles.css&hidenavigation=1\" style=\"width:100%; height: 380px; border:0; border-radius: 4px; overflow:hidden;\" title=\"css-subgrid\" allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\" sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"><\/iframe>\n  <\/figure>\n<hr>\n<h2>6. CSS Text Wrap Balance<\/h2>\n<p>Ever notice how some headlines look awkward because one word hangs alone on the last line?<\/p>\n<p>The new <code>text-wrap: balance;<\/code> property fixes that automatically. It tells the browser to adjust line breaks so each line is more evenly balanced.<\/p>\n<p>For best results, we can pair it with a max width like <code>max-inline-size<\/code> so the browser can calculate the ideal line breaks efficiently. It\u2019s perfect for short text blocks like headings, subheadings, or quotes.<\/p>\n<p>Here is an example:<\/p>\n<figure>\n    <iframe src=\"https:\/\/codesandbox.io\/embed\/mj8ynj?view=editor&module=%2Fstyles.css&hidenavigation=1\" style=\"width:100%; height: 380px; border:0; border-radius: 4px; overflow:hidden;\" title=\"css-text-wrap-balance\" allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\" sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"><\/iframe>\n  <\/figure>\n<hr>\n<h2>7. Dynamic Viewport Units<\/h2>\n<p>The classic <code>100vh<\/code> unit has long been a headache on mobile devices. For example, it could cause browser toolbars and address bars to shift as you scroll, often cutting off content or causing awkward extra space.<\/p>\n<p>Modern CSS fixes this with new viewport units that handle these changes smoothly:<\/p>\n<ul>\n<li><code>lvh<\/code>: height when the browser UI is hidden (largest viewport).<\/li>\n<li><code>svh<\/code>: height when the browser UI is fully visible (smallest viewport).<\/li>\n<li><code>dvh<\/code>: dynamic height that automatically adjusts as the UI changes.<\/li>\n<\/ul>\n<p>Using <code>dvh<\/code> will give you more reliable full-screen sections or sticky layouts without messy JavaScript fixes. It adapts perfectly to whatever space is actually visible, finally solving one of responsive design\u2019s most persistent problems.<\/p>\n<figure>\n    <iframe src=\"https:\/\/codesandbox.io\/embed\/gkhylf?view=editor&module=%2Fstyles.css&hidenavigation=1\" style=\"width:100%; height: 380px; border:0; border-radius: 4px; overflow:hidden;\" title=\"css-dynamic-viewport-units\" allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\" sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"><\/iframe>\n  <\/figure>\n<hr>\n<h2>8. CSS Accent Color<\/h2>\n<p>The new <code>accent-color<\/code> property makes it easy to match native form elements. You can set a single color, and the browser automatically applies it to the accent parts of native controls.<\/p>\n<p>It works on checkboxes, radio buttons, range sliders, and even progress bars. So with just one line of CSS, your form elements can instantly match your brand colors.<\/p>\n<figure>\n    <iframe src=\"https:\/\/codesandbox.io\/embed\/mtc3rn?view=editor&hidenavigation=1&module=%2Fstyles.css\" style=\"width:100%; height: 380px; border:0; border-radius: 4px; overflow:hidden;\" title=\"css-accent-color\" allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\" sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"><\/iframe>\n  <\/figure>\n<hr>\n<h2>9. CSS Layers<\/h2>\n<p>The new <code>@layer<\/code> directive allows you to manage complex style sheets without fighting \u201cspecificity wars\u201d. Instead of writing complicated selectors to override other styles, you can group your CSS into layers and control which ones take priority.<\/p>\n<p>With <code>@layer<\/code>, you can decide the order your styles load. Higher layers always override lower ones, no matter how specific the selector is.<\/p>\n<p>For example:<\/p>\n<figure>\n    <iframe src=\"https:\/\/codesandbox.io\/embed\/92z35n?view=editor&module=%2Fstyles.css&hidenavigation=1\" style=\"width:100%; height: 380px; border:0; border-radius: 4px; overflow:hidden;\" title=\"css-layers\" allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\" sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"><\/iframe>\n  <\/figure>\n<hr>\n<h2>10. CSS OKLCH Colors<\/h2>\n<p>Older color formats like Hex and RGB don\u2019t always match how we actually see color. For example, yellow and blue with the same lightness value can appear totally different in brightness.<\/p>\n<p>That\u2019s where OKLCH and LCH come in. These new color models are based on how humans perceive color, so adjusting brightness or saturation looks natural and consistent. They\u2019re great for creating accessible themes, smooth dark modes, and color palettes that stay balanced across all screens.<\/p>\n<p>For example:<\/p>\n<figure>\n    <iframe src=\"https:\/\/codesandbox.io\/embed\/v35wmh?view=preview&module=%2Fstyles.css&hidenavigation=1\" style=\"width:100%; height: 380px; border:0; border-radius: 4px; overflow:hidden;\" title=\"css-oklch\" allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\" sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"><\/iframe>\n  <\/figure>\n<hr>\n<h2>Wrapping Up<\/h2>\n<p>We\u2019ve seen many features in CSS, from container queries and nesting to OKLCH colors and cascade layers. Modern CSS gives developers more control, flexibility, and power than ever before. Most of these features are already supported in today\u2019s browsers, so you can start using them right now to build the future of the web.<\/p>","protected":false},"excerpt":{"rendered":"<p>CSS has come a long way. We once relied on preprocessors like Sass or JavaScript hacks just to do basic things like use variables, nest selectors, or build flexible layouts. These tools worked, but they often added extra setup, slower builds, and more complexity than we\u2019d like. Today many of these features are built right&hellip;<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[507,2016],"topic":[],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>10 Modern CSS Features You Can Use Today - Hongkiat<\/title>\n<meta name=\"description\" content=\"CSS has come a long way. We once relied on preprocessors like Sass or JavaScript hacks just to do basic things like use variables, nest selectors, or\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"10 Modern CSS Features You Can Use Today\" \/>\n<meta property=\"og:description\" content=\"CSS has come a long way. We once relied on preprocessors like Sass or JavaScript hacks just to do basic things like use variables, nest selectors, or\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-28T13:00:03+00:00\" \/>\n<meta name=\"author\" content=\"Thoriq Firdaus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tfirdaus\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoriq Firdaus\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/modern-css-features\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/modern-css-features\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"10 Modern CSS Features You Can Use Today\",\"datePublished\":\"2025-11-28T13:00:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/modern-css-features\\\/\"},\"wordCount\":1002,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"CSS\",\"HTML5 \\\/ CSS3 Tutorials\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/modern-css-features\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/modern-css-features\\\/\",\"name\":\"10 Modern CSS Features You Can Use Today - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2025-11-28T13:00:03+00:00\",\"description\":\"CSS has come a long way. We once relied on preprocessors like Sass or JavaScript hacks just to do basic things like use variables, nest selectors, or\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/modern-css-features\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/modern-css-features\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/modern-css-features\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"10 Modern CSS Features You Can Use Today\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\",\"name\":\"Thoriq Firdaus\",\"description\":\"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.\",\"sameAs\":[\"https:\\\/\\\/thoriq.com\",\"https:\\\/\\\/x.com\\\/tfirdaus\"],\"jobTitle\":\"Web Developer\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/thoriq\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"10 Modern CSS Features You Can Use Today - Hongkiat","description":"CSS has come a long way. We once relied on preprocessors like Sass or JavaScript hacks just to do basic things like use variables, nest selectors, or","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/","og_locale":"en_US","og_type":"article","og_title":"10 Modern CSS Features You Can Use Today","og_description":"CSS has come a long way. We once relied on preprocessors like Sass or JavaScript hacks just to do basic things like use variables, nest selectors, or","og_url":"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2025-11-28T13:00:03+00:00","author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"10 Modern CSS Features You Can Use Today","datePublished":"2025-11-28T13:00:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/"},"wordCount":1002,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["CSS","HTML5 \/ CSS3 Tutorials"],"articleSection":["Coding"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/","url":"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/","name":"10 Modern CSS Features You Can Use Today - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2025-11-28T13:00:03+00:00","description":"CSS has come a long way. We once relied on preprocessors like Sass or JavaScript hacks just to do basic things like use variables, nest selectors, or","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/modern-css-features\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/modern-css-features\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"10 Modern CSS Features You Can Use Today"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807","name":"Thoriq Firdaus","description":"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.","sameAs":["https:\/\/thoriq.com","https:\/\/x.com\/tfirdaus"],"jobTitle":"Web Developer","url":"https:\/\/www.hongkiat.com\/blog\/author\/thoriq\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-jiF","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/74193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=74193"}],"version-history":[{"count":1,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/74193\/revisions"}],"predecessor-version":[{"id":74194,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/74193\/revisions\/74194"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=74193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=74193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=74193"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=74193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}