css-loader VS oocss

Compare css-loader vs oocss and see what are their differences.

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
css-loader oocss
10 6
4,283 6,234
0.4% -
7.6 0.0
15 days ago over 3 years ago
JavaScript JavaScript
MIT License GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

css-loader

Posts with mentions or reviews of css-loader. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-29.
  • CSS: From Chaos to Order
    4 projects | dev.to | 29 Dec 2022
    @fbem/css-loader is very similar to css-loader (and actually a fork of it) and has almost the same set of options and functionality. You can even use it with different style preprocessors by simply chaining loaders together in webpack config. But be sure to pick up if you need them 😏.
  • React SSR loading CSS on express server problems.
    2 projects | /r/reactjs | 25 Jul 2022
    Css files need a css loader like https://github.com/webpack-contrib/css-loader. In fact I see you already have 2 css loaders in your normal webpack config. the server config needs those too. Your fronted build and server build will be very similar in that regard.
  • Vue devs, what can React do better than Vue 3?
    7 projects | /r/vuejs | 26 May 2022
    React comes by default with css module support via https://github.com/webpack-contrib/css-loader, which is stable and not deprecated. (Note that this entirely independent of react)
  • Use PrimeReact Themes with CSS Modules Enabled in React Application
    1 project | /r/codehunter | 15 May 2022
    I have enabled CSS modules within webpack.config in my React application so that I can locally scope CSS files to individual components. I'm also trying to use the TabView component from PrimeReact. When I do so the themes from PrimeReact are not applied. If I create a separate project and do not enable CSS modules the themes apply correctly.
  • Built-In CSS naming pattern
    1 project | /r/nextjs | 9 Jan 2022
    this is technically a feature of css-loader and not of nextjs, next just supports it ootb through their webpack config. iirc its this option you need to customize
  • [beginner help] Breaking change in config file
    1 project | /r/webpack | 14 Oct 2021
    const config = { mode: isProdBuild ? 'production' : 'development', devtool: isProdBuild ? 'source-map' : 'cheap-module-eval-source-map', entry: { app: `${SRC_DIR}/index.js`, }, optimization: { minimize: isProdBuild, sideEffects: true, }, context: SRC_DIR, stats: { colors: true, hash: true, timings: true, assets: true, chunks: false, chunkModules: false, modules: false, children: false, warnings: true, }, module: { rules: [ transpileJavaScriptRule(mode), loadWebWorkersRule, loadShadersRule, ], }, resolve: { // Which directories to search when resolving modules modules: [ // Modules specific to this package path.resolve(__dirname, '../node_modules'), // Hoisted Yarn Workspace Modules path.resolve(__dirname, '../../../node_modules'), SRC_DIR, ], // Attempt to resolve these extensions in order. extensions: ['.js', '.jsx', '.json', '*'], // symlinked resources are resolved to their real path, not their symlinked location symlinks: true, }, plugins: [ new webpack.DefinePlugin({ /* Application */ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), 'process.env.DEBUG': JSON.stringify(process.env.DEBUG), 'process.env.APP_CONFIG': JSON.stringify(process.env.APP_CONFIG || ''), 'process.env.PUBLIC_URL': JSON.stringify(process.env.PUBLIC_URL || ''), 'process.env.VERSION_NUMBER': JSON.stringify(PACKAGE.version || ''), 'process.env.BUILD_NUM': JSON.stringify(BUILD_NUM), /* i18n */ 'process.env.USE_LOCIZE': JSON.stringify(process.env.USE_LOCIZE || ''), 'process.env.LOCIZE_PROJECTID': JSON.stringify(process.env.LOCIZE_PROJECTID || ''), 'process.env.LOCIZE_API_KEY': JSON.stringify(process.env.LOCIZE_API_KEY || ''), /* XNAT dev */ 'process.env.XNAT_PROXY': JSON.stringify(process.env.XNAT_PROXY || ''), 'process.env.XNAT_DOMAIN': JSON.stringify(process.env.XNAT_DOMAIN || ''), 'process.env.XNAT_USERNAME': JSON.stringify(process.env.XNAT_USERNAME || ''), 'process.env.XNAT_PASSWORD': JSON.stringify(process.env.XNAT_PASSWORD || ''), }), ], // // Fix: https://github.com/webpack-contrib/css-loader/issues/447#issuecomment-285598881 // // For issue in cornerstone-wado-image-loader // node: { // fs: 'empty', // }, };
  • Why I left CSS-in-JS and returned to good old CSS preprocessors
    4 projects | dev.to | 28 May 2021
    One possible non-JSS solution is css-modules supported in css-loader. That requires some setup which may get convoluted if you need CSS preprocessors or SSR.
  • 18 Alternatives to Using Tailwind CSS: Do You Really Need It?
    14 projects | dev.to | 8 May 2021
    ✨ css loader 💥 jss 🌟 csjs ☄️ aphrodite
  • Let Obfuscate it. (Optmisation technic)
    3 projects | dev.to | 19 Mar 2021
    Before we start, you should have a minimum knowledge of webpack, you should have css-loader. Along this article, I use nuxt for example, but you can use React or Angular.
  • Share variables between JavaScript and CSS
    4 projects | dev.to | 28 Feb 2021
    The above should work in Create React App out of the box. If you are rolling your own Webpack configuration (may God have mercy on your soul), you'll need to configure modules with a compileType of icss:

oocss

Posts with mentions or reviews of oocss. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-10.
  • Past Informs the Present: Begin’s Approach to CSS
    9 projects | dev.to | 10 Jan 2023
    Perhaps the most important CSS methodology to emerge during the web’s transition towards application-like websites was Object Oriented CSS (OOCSS), devised by Nicole Sullivan in 2009. Nicole’s now legendary article, ‘The Media Object Saves Hundreds of Lines of Code’, represented a fundamental rethinking on the composition of CSS rulesets and their relationship to HTML content. Instead of writing CSS styles around specific HTML content or basing styles on the location of content within the DOM, OOCSS prioritized writing reusable styling rules based on design patterns (in the case of the media object: ‘a fixed size media element (e.g. image or video) along with other variable size content (e.g. text)’). As perhaps the first instance of a CSS methodology systematically informed by a visual pattern language, OOCSS was also a critical step towards a more modular, reusable approach to writing CSS.
  • Got Messy Spaghetti Stylesheets? 4 Techniques for Managing CSS Complexity
    6 projects | dev.to | 29 Apr 2022
    Component based CSS frameworks originating with OOCSS inherently limits selector scope to only elements inside the 'CSS object'.
  • The React roadmap for beginners you never knew you needed.
    42 projects | dev.to | 23 Nov 2021
    OOCSS
  • What are some Frontend best practices?
    1 project | /r/Frontend | 25 Oct 2021
    OOCSS - Object Oriented CSS
  • My friend is learning CSS and HTML. Can you find ten things he can improve in his coding style?
    6 projects | /r/css | 9 Jun 2021
    OOCSS - (Object-oriented CSS) 2. Use a preprocessor. They fill the lacking features of CSS and helps you write more readable, and smaller reusable pieces of CSS. Some popular preprocessors are: 1. Sass 2. Less 3. Stylus 3. Reduce redundancy. You are using font-weight: bold for the header, but you are also setting it for the div inside. CSS stands for Cascading Style Sheets because styles in CSS are cascading, meaning child elements will inherit styles from parents. 4. Avoid using strong and complex selectors. You are using an id, but a class would do just fine. Having strong selectors means you will have a harder time overriding them later on if needed. 5. Avoid using !important as much as possible. Only use it for utility and helper classes if you must, which need to override anything, such as hiding or displaying an element. 6. Don't use inline CSS, unless your inlining critical CSS. Instead, import styles using a link tag in your head element. (Critical CSS refers to above-the-fold content. Inlining it can help users see a properly rendered page more quicker) 7. Use semantic HTML. You are assigning a header class to a div, which could have been an h1/2/3/n element. This not only helps in terms of accessibility but can also help to improve your SEO score. 8. Use rem for typography. You are using em which cascades, meaning if you set the root element to have 12px, a main element with 2em will have the font size of 24px. If you put a div inside of it with 2em, it will have a font size of 48px, meaning that the size is duplicated. This makes it hard to track down values for deeply nested elements. Instead, use rem which stands for root em, and does not cascade. 9. Make sure your formatting is consistent. You use opening brackets both after a selector and on a new line. Tools like stylelint can help you enforce certain rules to keep your code more consistent, which helps to improve readability and maintainability. 10. Outsource your colors / sizes / spacings into variables. Everything that is bound to change can be in a configuration file to make things more flexible. You can either use CSS variables for this, or a preprocessor. 11. Nothing is written in stone, feel free to come up with your own set of rules that helps you create a more dev-friendly environment. But most importantly, keep things consistent.
  • 18 Alternatives to Using Tailwind CSS: Do You Really Need It?
    14 projects | dev.to | 8 May 2021
    ✨ BEM 💥 Object Oriented CSS 🌟 Atomic CSS

What are some alternatives?

When comparing css-loader and oocss you can also consider the following projects:

sass-loader - Compiles Sass to CSS

stylelint - A mighty CSS linter that helps you avoid errors and enforce conventions.

icss - Interoperable CSS — a standard for loadable, linkable CSS

Sass - Sass makes CSS fun!

raw-loader - A loader for webpack that allows importing files as a String

Aphrodite - Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation

iCSS - 不止于 CSS

Atomizer - A library to create small, reusable CSS that scales as your website grows.

eslint-loader - [DEPRECATED] A ESlint loader for webpack

stylus - Expressive, robust, feature-rich CSS language built for nodejs

JSS - JSS is an authoring tool for CSS which uses JavaScript as a host language.