Alternatives to CSS Modules logo

Alternatives to CSS Modules

Sass, Radium, BEM, CSS Blocks, and styled-components are the most popular alternatives and competitors to CSS Modules.
130
2

What is CSS Modules and what are its top alternatives?

It is a CSS file in which all class names and animation names are scoped locally by default. The key words here are scoped locally. With this, your CSS class names become similar to local variables in JavaScript. It goes into the compiler, and CSS comes out the other side.
CSS Modules is a tool in the CSS Pre-processors / Extensions category of a tech stack.

Top Alternatives to CSS Modules

  • Sass
    Sass

    Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin. ...

  • Radium
    Radium

    Radium is a set of tools to manage inline styles on React elements. It gives you powerful styling capabilities without CSS. ...

  • BEM
    BEM

    This methodology was developed at Yandex with the goals in mind that Fast development and long-lasting results for standard projects,A project involves many people,Scalable teams,Code reuse. ...

  • CSS Blocks
    CSS Blocks

    By combining an opinionated authoring system, build-time analysis and rewriting of templates, and a new type of CSS optimizer, css-blocks breathes new power and ease of use into the technologies and best practices that stylesheet developers already know and love. ...

  • styled-components
    styled-components

    Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅 ...

  • Emotion
    Emotion

    Emotion is a performant and flexible CSS-in-JS library. Building on many other CSS-in-JS libraries, it allows you to style apps quickly with string or object styles. It has predictable composition to avoid specificity issues with CSS. With source maps and labels, Emotion has a great developer experience and great performance with heavy caching in production. ...

  • JavaScript
    JavaScript

    JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles. ...

  • Python
    Python

    Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best. ...

CSS Modules alternatives & related posts

Sass logo

Sass

42.6K
31.7K
3K
Syntactically Awesome Style Sheets
42.6K
31.7K
+ 1
3K
PROS OF SASS
  • 613
    Variables
  • 594
    Mixins
  • 466
    Nested rules
  • 410
    Maintainable
  • 300
    Functions
  • 149
    Modular flexible code
  • 143
    Open source
  • 112
    Selector inheritance
  • 107
    Dynamic
  • 96
    Better than cs
  • 5
    Used by Bootstrap
  • 3
    If and for function
  • 2
    Better than less
  • 1
    Inheritance (@extend)
  • 1
    Custom functions
CONS OF SASS
  • 6
    Needs to be compiled

related Sass posts

Simon Reymann
Senior Fullstack Developer at QUANTUSflow Software GmbH · | 24 upvotes · 4.9M views

Our whole Vue.js frontend stack (incl. SSR) consists of the following tools:

  • Nuxt.js consisting of Vue CLI, Vue Router, vuex, Webpack and Sass (Bundler for HTML5, CSS 3), Babel (Transpiler for JavaScript),
  • Vue Styleguidist as our style guide and pool of developed Vue.js components
  • Vuetify as Material Component Framework (for fast app development)
  • TypeScript as programming language
  • Apollo / GraphQL (incl. GraphiQL) for data access layer (https://apollo.vuejs.org/)
  • ESLint, TSLint and Prettier for coding style and code analyzes
  • Jest as testing framework
  • Google Fonts and Font Awesome for typography and icon toolkit
  • NativeScript-Vue for mobile development

The main reason we have chosen Vue.js over React and AngularJS is related to the following artifacts:

  • Empowered HTML. Vue.js has many similar approaches with Angular. This helps to optimize HTML blocks handling with the use of different components.
  • Detailed documentation. Vue.js has very good documentation which can fasten learning curve for developers.
  • Adaptability. It provides a rapid switching period from other frameworks. It has similarities with Angular and React in terms of design and architecture.
  • Awesome integration. Vue.js can be used for both building single-page applications and more difficult web interfaces of apps. Smaller interactive parts can be easily integrated into the existing infrastructure with no negative effect on the entire system.
  • Large scaling. Vue.js can help to develop pretty large reusable templates.
  • Tiny size. Vue.js weights around 20KB keeping its speed and flexibility. It allows reaching much better performance in comparison to other frameworks.
See more
Ali Soueidan
Creative Web Developer at Ali Soueidan · | 18 upvotes · 1.2M views

Application and Data: Since my personal website ( https://alisoueidan.com ) is a SPA I've chosen to use Vue.js, as a framework to create it. After a short skeptical phase I immediately felt in love with the single file component concept! I also used vuex for state management, which makes working with several components, which are communicating with each other even more fun and convenient to use. Of course, using Vue requires using JavaScript as well, since it is the basis of it.

For markup and style, I used Pug and Sass, since they’re the perfect match to me. I love the clean and strict syntax of both of them and even more that their structure is almost similar. Also, both of them come with an expanded functionality such as mixins, loops and so on related to their “siblings” (HTML and CSS). Both of them require nesting and prevent untidy code, which can be a huge advantage when working in teams. I used JSON to store data (since the data quantity on my website is moderate) – JSON works also good in combo with Pug, using for loops, based on the JSON Objects for example.

To send my contact form I used PHP, since sending emails using PHP is still relatively convenient, simple and easy done.

DevOps: Of course, I used Git to do my version management (which I even do in smaller projects like my website just have an additional backup of my code). On top of that I used GitHub since it now supports private repository for free accounts (which I am using for my own). I use Babel to use ES6 functionality such as arrow functions and so on, and still don’t losing cross browser compatibility.

Side note: I used npm for package management. 🎉

*Business Tools: * I use Asana to organize my project. This is a big advantage to me, even if I work alone, since “private” projects can get interrupted for some time. By using Asana I still know (even after month of not touching a project) what I’ve done, on which task I was at last working on and what still is to do. Working in Teams (for enterprise I’d take on Jira instead) of course Asana is a Tool which I really love to use as well. All the graphics on my website are SVG which I have created with Adobe Illustrator and adjusted within the SVG code or by using JavaScript or CSS (SASS).

See more
Radium logo

Radium

17
34
0
A toolchain for React component styling
17
34
+ 1
0
PROS OF RADIUM
    Be the first to leave a pro
    CONS OF RADIUM
      Be the first to leave a con

      related Radium posts

      BEM logo

      BEM

      121
      98
      0
      It is a methodology, that helps you to achieve reusable components and code sharing in the front-end
      121
      98
      + 1
      0
      PROS OF BEM
        Be the first to leave a pro
        CONS OF BEM
          Be the first to leave a con

          related BEM posts

          CSS Blocks logo

          CSS Blocks

          27
          36
          0
          A component-oriented CSS authoring system by LinkedIn
          27
          36
          + 1
          0
          PROS OF CSS BLOCKS
            Be the first to leave a pro
            CONS OF CSS BLOCKS
              Be the first to leave a con

              related CSS Blocks posts

              styled-components logo

              styled-components

              1.9K
              605
              12
              Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps...
              1.9K
              605
              + 1
              12
              PROS OF STYLED-COMPONENTS
              • 11
                Very easy to use and integrate
              • 1
                Huihui
              CONS OF STYLED-COMPONENTS
                Be the first to leave a con

                related styled-components posts

                Johnny Bell

                I was building a personal project that I needed to store items in a real time database. I am more comfortable with my Frontend skills than my backend so I didn't want to spend time building out anything in Ruby or Go.

                I stumbled on Firebase by #Google, and it was really all I needed. It had realtime data, an area for storing file uploads and best of all for the amount of data I needed it was free!

                I built out my application using tools I was familiar with, React for the framework, Redux.js to manage my state across components, and styled-components for the styling.

                Now as this was a project I was just working on in my free time for fun I didn't really want to pay for hosting. I did some research and I found Netlify. I had actually seen them at #ReactRally the year before and deployed a Gatsby site to Netlify already.

                Netlify was very easy to setup and link to my GitHub account you select a repo and pretty much with very little configuration you have a live site that will deploy every time you push to master.

                With the selection of these tools I was able to build out my application, connect it to a realtime database, and deploy to a live environment all with $0 spent.

                If you're looking to build out a small app I suggest giving these tools a go as you can get your idea out into the real world for absolutely no cost.

                See more
                Divine Bawa
                at PayHub Ghana Limited · | 16 upvotes · 486.5K views

                I just finished a web app meant for a business that offers training programs for certain professional courses. I chose this stack to test out my skills in graphql and react. I used Node.js , GraphQL , MySQL for the #Backend utilizing Prisma as a database interface for MySQL to provide CRUD APIs and graphql-yoga as a server. For the #frontend I chose React, styled-components for styling, Next.js for routing and SSR and Apollo for data management. I really liked the outcome and I will definitely use this stack in future projects.

                See more
                Emotion logo

                Emotion

                292
                240
                3
                The Next Generation of CSS in JS
                292
                240
                + 1
                3
                PROS OF EMOTION
                • 3
                  Easy to use
                CONS OF EMOTION
                  Be the first to leave a con

                  related Emotion posts

                  Robert Zuber

                  We are in the process of adopting Next.js as our React framework and using Storybook to help build our React components in isolation. This new part of our frontend is written in TypeScript, and we use Emotion for CSS/styling. For delivering data, we use GraphQL and Apollo. Jest, Percy, and Cypress are used for testing.

                  See more
                  Johnny Bell

                  For Stack Decisions I needed to add Markdown in the decision composer to give our users access to some general styling when writing their decisions. We used React & GraphQL on the #Frontend and Ruby & GraphQL on the backend.

                  Instead of using Showdown or another tool, We decided to parse the Markdown on the backend so we had more control over what we wanted to render in Markdown because we didn't want to enable all Markdown options, we also wanted to limit any malicious code or images to be embedded into the decisions and Markdown was a fairly large to import into our component so it was going to add a lot of kilobytes that we didn't need.

                  We also needed to style how the markdown looked, we are currently using Glamorous so I used that but we are planning to update this to Emotion at some stage as it has a fairly easy upgrade path rather than switching over to styled-components or one of the other cssInJs alternatives.

                  Also we used React-Mentions for tagging tools and topics in the decisions. Typing @ will let you tag a tool, and typing # will allow you to tag a topic.

                  The Markdown options that we chose to support are tags: a, code, u, b, em, pre, ul, ol, li.

                  If there are anymore tags you'd love to see added in the composer leave me a comment below and we will look into adding them.

                  #StackDecisionsLaunch

                  See more
                  JavaScript logo

                  JavaScript

                  360.8K
                  274.4K
                  8.1K
                  Lightweight, interpreted, object-oriented language with first-class functions
                  360.8K
                  274.4K
                  + 1
                  8.1K
                  PROS OF JAVASCRIPT
                  • 1.7K
                    Can be used on frontend/backend
                  • 1.5K
                    It's everywhere
                  • 1.2K
                    Lots of great frameworks
                  • 898
                    Fast
                  • 746
                    Light weight
                  • 425
                    Flexible
                  • 392
                    You can't get a device today that doesn't run js
                  • 286
                    Non-blocking i/o
                  • 237
                    Ubiquitousness
                  • 191
                    Expressive
                  • 55
                    Extended functionality to web pages
                  • 49
                    Relatively easy language
                  • 46
                    Executed on the client side
                  • 30
                    Relatively fast to the end user
                  • 25
                    Pure Javascript
                  • 21
                    Functional programming
                  • 15
                    Async
                  • 13
                    Full-stack
                  • 12
                    Future Language of The Web
                  • 12
                    Setup is easy
                  • 12
                    Its everywhere
                  • 11
                    Because I love functions
                  • 11
                    JavaScript is the New PHP
                  • 10
                    Like it or not, JS is part of the web standard
                  • 9
                    Easy
                  • 9
                    Can be used in backend, frontend and DB
                  • 9
                    Expansive community
                  • 9
                    Everyone use it
                  • 8
                    Easy to hire developers
                  • 8
                    Most Popular Language in the World
                  • 8
                    For the good parts
                  • 8
                    Can be used both as frontend and backend as well
                  • 8
                    No need to use PHP
                  • 8
                    Powerful
                  • 7
                    Evolution of C
                  • 7
                    Its fun and fast
                  • 7
                    It's fun
                  • 7
                    Nice
                  • 7
                    Versitile
                  • 7
                    Hard not to use
                  • 7
                    Popularized Class-Less Architecture & Lambdas
                  • 7
                    Agile, packages simple to use
                  • 7
                    Supports lambdas and closures
                  • 7
                    Love-hate relationship
                  • 7
                    Photoshop has 3 JS runtimes built in
                  • 6
                    1.6K Can be used on frontend/backend
                  • 6
                    Client side JS uses the visitors CPU to save Server Res
                  • 6
                    It let's me use Babel & Typescript
                  • 6
                    Easy to make something
                  • 6
                    Can be used on frontend/backend/Mobile/create PRO Ui
                  • 5
                    Client processing
                  • 5
                    What to add
                  • 5
                    Everywhere
                  • 5
                    Scope manipulation
                  • 5
                    Function expressions are useful for callbacks
                  • 5
                    Stockholm Syndrome
                  • 5
                    Promise relationship
                  • 5
                    Clojurescript
                  • 4
                    Only Programming language on browser
                  • 4
                    Because it is so simple and lightweight
                  • 1
                    Easy to learn and test
                  • 1
                    Easy to understand
                  • 1
                    Not the best
                  • 1
                    Subskill #4
                  • 1
                    Hard to learn
                  • 1
                    Test2
                  • 1
                    Test
                  • 1
                    Easy to learn
                  • 0
                    Hard 彤
                  CONS OF JAVASCRIPT
                  • 22
                    A constant moving target, too much churn
                  • 20
                    Horribly inconsistent
                  • 15
                    Javascript is the New PHP
                  • 9
                    No ability to monitor memory utilitization
                  • 8
                    Shows Zero output in case of ANY error
                  • 7
                    Thinks strange results are better than errors
                  • 6
                    Can be ugly
                  • 3
                    No GitHub
                  • 2
                    Slow
                  • 0
                    HORRIBLE DOCUMENTS, faulty code, repo has bugs

                  related JavaScript posts

                  Zach Holman

                  Oof. I have truly hated JavaScript for a long time. Like, for over twenty years now. Like, since the Clinton administration. It's always been a nightmare to deal with all of the aspects of that silly language.

                  But wowza, things have changed. Tooling is just way, way better. I'm primarily web-oriented, and using React and Apollo together the past few years really opened my eyes to building rich apps. And I deeply apologize for using the phrase rich apps; I don't think I've ever said such Enterprisey words before.

                  But yeah, things are different now. I still love Rails, and still use it for a lot of apps I build. But it's that silly rich apps phrase that's the problem. Users have way more comprehensive expectations than they did even five years ago, and the JS community does a good job at building tools and tech that tackle the problems of making heavy, complicated UI and frontend work.

                  Obviously there's a lot of things happening here, so just saying "JavaScript isn't terrible" might encompass a huge amount of libraries and frameworks. But if you're like me, yeah, give things another shot- I'm somehow not hating on JavaScript anymore and... gulp... I kinda love it.

                  See more
                  Conor Myhrvold
                  Tech Brand Mgr, Office of CTO at Uber · | 44 upvotes · 12.7M views

                  How Uber developed the open source, end-to-end distributed tracing Jaeger , now a CNCF project:

                  Distributed tracing is quickly becoming a must-have component in the tools that organizations use to monitor their complex, microservice-based architectures. At Uber, our open source distributed tracing system Jaeger saw large-scale internal adoption throughout 2016, integrated into hundreds of microservices and now recording thousands of traces every second.

                  Here is the story of how we got here, from investigating off-the-shelf solutions like Zipkin, to why we switched from pull to push architecture, and how distributed tracing will continue to evolve:

                  https://eng.uber.com/distributed-tracing/

                  (GitHub Pages : https://www.jaegertracing.io/, GitHub: https://github.com/jaegertracing/jaeger)

                  Bindings/Operator: Python Java Node.js Go C++ Kubernetes JavaScript OpenShift C# Apache Spark

                  See more
                  Python logo

                  Python

                  244.8K
                  199.9K
                  6.9K
                  A clear and powerful object-oriented programming language, comparable to Perl, Ruby, Scheme, or Java.
                  244.8K
                  199.9K
                  + 1
                  6.9K
                  PROS OF PYTHON
                  • 1.2K
                    Great libraries
                  • 962
                    Readable code
                  • 847
                    Beautiful code
                  • 788
                    Rapid development
                  • 690
                    Large community
                  • 438
                    Open source
                  • 393
                    Elegant
                  • 282
                    Great community
                  • 272
                    Object oriented
                  • 220
                    Dynamic typing
                  • 77
                    Great standard library
                  • 60
                    Very fast
                  • 55
                    Functional programming
                  • 49
                    Easy to learn
                  • 45
                    Scientific computing
                  • 35
                    Great documentation
                  • 29
                    Productivity
                  • 28
                    Easy to read
                  • 28
                    Matlab alternative
                  • 24
                    Simple is better than complex
                  • 20
                    It's the way I think
                  • 19
                    Imperative
                  • 18
                    Free
                  • 18
                    Very programmer and non-programmer friendly
                  • 17
                    Powerfull language
                  • 17
                    Machine learning support
                  • 16
                    Fast and simple
                  • 14
                    Scripting
                  • 12
                    Explicit is better than implicit
                  • 11
                    Ease of development
                  • 10
                    Clear and easy and powerfull
                  • 9
                    Unlimited power
                  • 8
                    It's lean and fun to code
                  • 8
                    Import antigravity
                  • 7
                    Print "life is short, use python"
                  • 7
                    Python has great libraries for data processing
                  • 6
                    Although practicality beats purity
                  • 6
                    Now is better than never
                  • 6
                    Great for tooling
                  • 6
                    Readability counts
                  • 6
                    Rapid Prototyping
                  • 6
                    I love snakes
                  • 6
                    Flat is better than nested
                  • 6
                    Fast coding and good for competitions
                  • 6
                    There should be one-- and preferably only one --obvious
                  • 6
                    High Documented language
                  • 5
                    Great for analytics
                  • 5
                    Lists, tuples, dictionaries
                  • 4
                    Easy to learn and use
                  • 4
                    Simple and easy to learn
                  • 4
                    Easy to setup and run smooth
                  • 4
                    Web scraping
                  • 4
                    CG industry needs
                  • 4
                    Socially engaged community
                  • 4
                    Complex is better than complicated
                  • 4
                    Multiple Inheritence
                  • 4
                    Beautiful is better than ugly
                  • 4
                    Plotting
                  • 3
                    Many types of collections
                  • 3
                    Flexible and easy
                  • 3
                    It is Very easy , simple and will you be love programmi
                  • 3
                    If the implementation is hard to explain, it's a bad id
                  • 3
                    Special cases aren't special enough to break the rules
                  • 3
                    Pip install everything
                  • 3
                    List comprehensions
                  • 3
                    No cruft
                  • 3
                    Generators
                  • 3
                    Import this
                  • 3
                    If the implementation is easy to explain, it may be a g
                  • 2
                    Can understand easily who are new to programming
                  • 2
                    Batteries included
                  • 2
                    Securit
                  • 2
                    Good for hacking
                  • 2
                    Better outcome
                  • 2
                    Only one way to do it
                  • 2
                    Because of Netflix
                  • 2
                    A-to-Z
                  • 2
                    Should START with this but not STICK with This
                  • 2
                    Powerful language for AI
                  • 1
                    Automation friendly
                  • 1
                    Sexy af
                  • 1
                    Slow
                  • 1
                    Procedural programming
                  • 0
                    Ni
                  • 0
                    Powerful
                  • 0
                    Keep it simple
                  CONS OF PYTHON
                  • 53
                    Still divided between python 2 and python 3
                  • 28
                    Performance impact
                  • 26
                    Poor syntax for anonymous functions
                  • 22
                    GIL
                  • 19
                    Package management is a mess
                  • 14
                    Too imperative-oriented
                  • 12
                    Hard to understand
                  • 12
                    Dynamic typing
                  • 12
                    Very slow
                  • 8
                    Indentations matter a lot
                  • 8
                    Not everything is expression
                  • 7
                    Incredibly slow
                  • 7
                    Explicit self parameter in methods
                  • 6
                    Requires C functions for dynamic modules
                  • 6
                    Poor DSL capabilities
                  • 6
                    No anonymous functions
                  • 5
                    Fake object-oriented programming
                  • 5
                    Threading
                  • 5
                    The "lisp style" whitespaces
                  • 5
                    Official documentation is unclear.
                  • 5
                    Hard to obfuscate
                  • 5
                    Circular import
                  • 4
                    Lack of Syntax Sugar leads to "the pyramid of doom"
                  • 4
                    The benevolent-dictator-for-life quit
                  • 4
                    Not suitable for autocomplete
                  • 2
                    Meta classes
                  • 1
                    Training wheels (forced indentation)

                  related Python posts

                  Conor Myhrvold
                  Tech Brand Mgr, Office of CTO at Uber · | 44 upvotes · 12.7M views

                  How Uber developed the open source, end-to-end distributed tracing Jaeger , now a CNCF project:

                  Distributed tracing is quickly becoming a must-have component in the tools that organizations use to monitor their complex, microservice-based architectures. At Uber, our open source distributed tracing system Jaeger saw large-scale internal adoption throughout 2016, integrated into hundreds of microservices and now recording thousands of traces every second.

                  Here is the story of how we got here, from investigating off-the-shelf solutions like Zipkin, to why we switched from pull to push architecture, and how distributed tracing will continue to evolve:

                  https://eng.uber.com/distributed-tracing/

                  (GitHub Pages : https://www.jaegertracing.io/, GitHub: https://github.com/jaegertracing/jaeger)

                  Bindings/Operator: Python Java Node.js Go C++ Kubernetes JavaScript OpenShift C# Apache Spark

                  See more
                  Nick Parsons
                  Building cool things on the internet 🛠️ at Stream · | 35 upvotes · 4.3M views

                  Winds 2.0 is an open source Podcast/RSS reader developed by Stream with a core goal to enable a wide range of developers to contribute.

                  We chose JavaScript because nearly every developer knows or can, at the very least, read JavaScript. With ES6 and Node.js v10.x.x, it’s become a very capable language. Async/Await is powerful and easy to use (Async/Await vs Promises). Babel allows us to experiment with next-generation JavaScript (features that are not in the official JavaScript spec yet). Yarn allows us to consistently install packages quickly (and is filled with tons of new tricks)

                  We’re using JavaScript for everything – both front and backend. Most of our team is experienced with Go and Python, so Node was not an obvious choice for this app.

                  Sure... there will be haters who refuse to acknowledge that there is anything remotely positive about JavaScript (there are even rants on Hacker News about Node.js); however, without writing completely in JavaScript, we would not have seen the results we did.

                  #FrameworksFullStack #Languages

                  See more