{"id":14976522,"url":"https://github.com/avraammavridis/inline-css-webpack-loader","last_synced_at":"2025-10-27T20:32:06.864Z","repository":{"id":57274144,"uuid":"57866039","full_name":"AvraamMavridis/inline-css-webpack-loader","owner":"AvraamMavridis","description":"Inline css/sass/scss webpack loader","archived":false,"fork":false,"pushed_at":"2022-10-18T08:38:24.000Z","size":11,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T08:06:19.467Z","etag":null,"topics":["css","loader","react","sass","scss","webpack","webpack-loader","webpack2"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AvraamMavridis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-02T04:29:56.000Z","updated_at":"2018-07-27T10:14:17.000Z","dependencies_parsed_at":"2022-09-17T10:11:52.049Z","dependency_job_id":null,"html_url":"https://github.com/AvraamMavridis/inline-css-webpack-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvraamMavridis%2Finline-css-webpack-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvraamMavridis%2Finline-css-webpack-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvraamMavridis%2Finline-css-webpack-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvraamMavridis%2Finline-css-webpack-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AvraamMavridis","download_url":"https://codeload.github.com/AvraamMavridis/inline-css-webpack-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238553295,"owners_count":19491403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","loader","react","sass","scss","webpack","webpack-loader","webpack2"],"created_at":"2024-09-24T13:54:01.278Z","updated_at":"2025-10-27T20:32:05.555Z","avatar_url":"https://github.com/AvraamMavridis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inline-css-webpack-loader\n\n[![CocoaPods](https://img.shields.io/cocoapods/l/AFNetworking.svg)]()\n[![semantic-versioning](https://img.shields.io/badge/semantic%20-versioning-green.svg)]()\n\nConvert `scss`, `sass`, `css` files to React friendly objects that you can use to inline styles to your components (so you can easier distribute them)\n\n##Install\n\n[![NPM](https://nodei.co/npm/inline-css-webpack-loader.png?mini=true)](https://nodei.co/npm/inline-css-webpack-loader/)\n\nWebpack config:\n\n```js\n  ...\n\t{\n\t\ttest: /\\.scss$/,\n\t\tloader: 'inline-css-webpack-loader'\n\t},\n\t...\n```\n\n##Example\n\ne.g.\n\n```scss\n\n// button.scss \n.something\n{\n  color : red;\n  background-color: blue;\n\n  \u0026:hover\n  {\n    color: blue;\n  }\n\n  .somethingElse\n  {\n    color:green;\n  }\n\n  \u0026:nth-child(2)\n  {\n    text-align: center;\n    font-size: 12px;\n    font-style: italic;\n  }\n}\n```\n\nWill generate the following object\n\n```js\nimport React, { Component } from 'react';\n\nimport * as cssMap from './button.scss';\n\n\n/*\ncssMap.something = {\n  backgroundColor: \"blue\",\n  color:\"red\"\n};\n\ncssMap.something__somethingElse = { \n  color: \"green\"\n};\n\ncssMap.something_hover = { \n  color: \"blue\"\n};\n\ncssMap.something_nth_child_2 = { \n   textAlign: \"center\",\n   fontSize: \"12px\",\n   fontStyle: \"italic\"\n}\n\n*/\n\n\nexport default class Button extends Proto\n{\n\n  render() {\n\n    return (\u003cbutton style={ cssMap.something }\u003e\n               Click me\n            \u003c/button\u003e)\n  }\n}\n```\n\n##Contributing\nFeel free to open issues, make suggestions or send PRs.\nThis project adheres to the Contributor Covenant [code of conduct](http://contributor-covenant.org/). By participating, you are expected to uphold this code.\n\n##Contact\n\nTwitter: [@avraamakis](https://twitter.com/avraamakis)\n\n##License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favraammavridis%2Finline-css-webpack-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favraammavridis%2Finline-css-webpack-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favraammavridis%2Finline-css-webpack-loader/lists"}