Stylable

CSS for components

README

Stand With Ukraine

Stylable CSS for Components
Build Status

Stylable enables you to write reusable, highly-performant components. Each component exposes a style API that maps its internal parts so you can reuse components across teams without sacrificing stylability.

- Scopes styles to components so they don't "leak" and clash with other styles.
- Enables custom pseudo-classes and pseudo-elements that abstract the internal structure of a component. These can then be styled externally.
- Cuts down on the resulting CSS bundles using "rule-shaking" and other optimizations

At build time, the preprocessor converts the Stylable CSS into a minimal, flat, static, valid vanilla CSS that works cross-browser.

Learn more in our Documentation Center.

Installation


There are two options for installing Stylable:

- Create a new project using create-stylable-app
- Install Stylable and its webpack plugin to an existing webpack based project

For details on both options, see Install & Configure.

Demos


- Mr. Potato Bruce - A small application showcasing Stylable
- Manual Vue Integration - Simple example showing how to manually integrate Stylable into a Vue project (proof of concept)
- Various webpack project setups - An example of possible webpack configurations

Repository Structure


This repository is a mono-repo containing multiple packages that together comprise the Stylable ecosystem. It uses NPM workspaces to manage the various packages and their dependencies.

Core & Internals


PackagePublishedLatestDescription
---------------------------------------------------------------:-----------------------------------------------------------------------------------------------------------------------------:----------------------------------
[core](./packages/core)`@stylable/core`[![npmCore
[runtime](./packages/runtime)`@stylable/runtime`[![npmRuntime
[optimizer](./packages/optimizer)`@stylable/optimizer`[![npmProduction
[module-utils](./packages/module-utils)`@stylable/module-utils`[![npmStylable
[custom-value](./packages/custom-value)`@stylable/custom-value`[![npmStylable

Tooling & Utilities


PackagePublishedLatestDescription
---------------------------------------------------------------------------------:-------------------------------------------------------------------------------------------------------------------------------------:------------------------------------------------------------------------------------------
[cli](./packages/cli)`@stylable/cli`[![npmUsed
[create-stylable-app](./packages/create-stylable-app)`create-stylable-app`[![npmBoilerplate
[schema-extract](./packages/schema-extract)`@stylable/schema-extract`[![npmJSON
[language-service](./packages/language-service)`@stylable/language-service`[![npmLanguage
[build-tools](./packages/build-tools)`@stylable/build-tools`[![npmA

Integrations


PackagePublishedLatestDescription
------------------------------------------------------------------------------------:-------------------------------------------------------------------------------------------------------------------------------------------:------------------------------------------------------------------
[jest](./packages/jest)`@stylable/jest`[![npmJest
[node](./packages/node)`@stylable/node`[![npm`require`
[webpack-extensions](./packages/webpack-extensions)`@stylable/webpack-extensions`[![npmExperimental
[webpack-plugin](./packages/webpack-plugin)`@stylable/webpack-plugin`[![npm`webpack`
[experimental-loader](./packages/experimental-loader)`@stylable/experimental-loader`[![npmexperimental
[rollup-plugin](./packages/rollup-plugin)`@stylable/rollup-plugin`[![npmRollup

Test-kits


PackagePublishedLatestDescription
------------------------------------------------------------------:-------------------------------------------------------------------------------------------------------------------------------:------------------------------------------------------------------------------------
[e2e-test-kit](./packages/e2e-test-kit)`@stylable/e2e-test-kit`[![npm`webpack`
[dom-test-kit](./packages/dom-test-kit)`@stylable/dom-test-kit`[![npmStylable
[core-test-kit](./packages/core-test-kit)`@stylable/core-test-kit`[![npmUtilities

External Packages


PackageDescription
------------------------------------------------------------------------------------------------------------------------------
[stylable-intelligence](https://github.com/wix/stylable-intelligence)VSCode

Contributing


Read our contributing guidelines for details on our code of conduct, and the process for submitting pull requests.

License


Copyright (c) 2017 Wix.com Ltd. All Rights Reserved. Use of this source code is governed by a MIT license.