---
title: "Discussion on \"Splitting your media queries into multiple files\" | Hashnode"
description: "Discussion on \"Splitting your media queries into multiple files\". Before the summer, I had the pleasure to read this article that talked about splitting your css into multiple files to optimize file size. At the time, I thought: well, this is nice, but that is going to be cumbersome to implement.\nRecently, I made a..."
url: "https://hashnode.com/posts/splitting-your-media-queries-into-multiple-files/63f3adbf3ac574e2561bbaa4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Splitting your media queries into multiple files](https://blog.lekoala.be/splitting-your-media-queries-into-multiple-files?utm_source=hashnode&utm_medium=feed)

Before the summer, I had the pleasure to read this article that talked about splitting your css into multiple files to optimize file size. At the time, I thought: well, this is nice, but that is going to be cumbersome to implement. Recently, I made a...

Feb 20, 2023 · 5 min read · blog.lekoala.be  
Read the article

-   [#bootstrap](https://hashnode.com/tag/bootstrap)
-   [#bootstrap-5](https://hashnode.com/tag/bootstrap-5)
-   [#css](https://hashnode.com/tag/css)
-   [#sass](https://hashnode.com/tag/sass)

## Written by

[Thomas Portelange](https://hashnode.com/@lekoala)

@lekoala · Belgium

  
[View profile](https://hashnode.com/@lekoala)

A PHP/JS Web Developer based in Belgium

A Web Developer based in Belgium, specialized in PHP &amp; JS development

## Responses 1

Markdown supported · ⌘↵ to post

[Sándor](https://hashnode.com/@levchak0910)

[Feb 11, 2024](https://hashnode.com/posts/splitting-your-media-queries-into-multiple-files/63f3adbf3ac574e2561bbaa4/comment/65c8f1356209494b48c93cf6)

As I understood you are trying to manage it via scss code. The method looks good, but I think it is easier to do in a post-build step by transforming bundled HTML and CSS files using PostCSS.

I have created a tool that can help with extracting media related rules into dedicated files. Have a look if you are interested )

github: levchak0910/css-media-splitter

[Thomas Portelange](https://hashnode.com/@lekoala)

[Feb 11, 2024](https://hashnode.com/posts/splitting-your-media-queries-into-multiple-files/63f3adbf3ac574e2561bbaa4/comment/65c8f1356209494b48c93cf6#reply-65c8f422ee0afa0f24556f3a)

Interesting ! thanks for sharing
