
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Sonata is a responsive CSS (Sass) framework and UI toolkit based on ITCSS architecture and BEM methodology that provides you with the structure and basic styles to start any web project.
It includes:
Sonata does not include complex components. The provided components are for the most common use cases in a web project and they are completely optional. Some of them might need basic JavaScript to work, like form-file or form-switch. Sonata does not include JavaScript.
There are no layer namespaces in class names (no u- prefix for utility classes, for example).
⚠️ Warning: This version of Sonata is built with LibSass, which is soon to be deprecated. Support for Dart Sass will be added in a future version.
The framework consists of several scss files, so a build system, like webpack, is necessary to compile them to CSS.
It is strongly recommended to include PurgeCSS in your build chain for production, to remove unused CSS. You might want to use Autoprefixer as well, to improve browser support.
npm install --save-dev sonatacss
/*
* Sonata CSS Framework v0.3.1
* https://github.com/alexcandelas/sonata
* MIT License
*/
// =============================================================================
// Contents
// =============================================================================
//
// Settings ...... Global variables and configuration.
// Tools ......... Mixins and functions.
// Generic ....... Resets and normalization.
// Elements ...... Unclassed HTML elements.
// Objects ....... Layout and design patterns (no cosmetics).
// Support ....... Simple styled elements and global animations.
// Components .... Designed pieces of UI.
// Utilities ..... Overrides and utility classes.
@import "node_modules/sonatacss/layers/_settings";
@import "node_modules/sonatacss/layers/_tools";
@import "node_modules/sonatacss/layers/_generic";
@import "node_modules/sonatacss/layers/_elements";
@import "node_modules/sonatacss/layers/_abstractions";
@import "node_modules/sonatacss/layers/_components";
@import "node_modules/sonatacss/layers/_utilities";
Each line is importing all the files for the corresponding layer.
Alternatively, if you need more control over which specific files you want to include, you can use the following template, removing the lines that you don't need:
/*
* Sonata CSS Framework v0.3.1
* https://github.com/alexcandelas/sonata
* MIT License
*/
// =============================================================================
// Contents
// =============================================================================
//
// Settings ...... Global variables and configuration.
// Tools ......... Mixins and functions.
// Generic ....... Resets and normalization.
// Elements ...... Unclassed HTML elements.
// Abstractions .. Objects (layout abstractions) and design patterns.
// Components .... Designed pieces of UI.
// Utilities ..... Overrides and utility classes.
// Settings
// =============================================================================
@import "node_modules/sonatacss/sass/1-settings/_breakpoints";
@import "node_modules/sonatacss/sass/1-settings/_class-names";
@import "node_modules/sonatacss/sass/1-settings/_colors";
@import "node_modules/sonatacss/sass/1-settings/_grid";
@import "node_modules/sonatacss/sass/1-settings/_radius";
@import "node_modules/sonatacss/sass/1-settings/_typography";
@import "node_modules/sonatacss/sass/1-settings/_utilities";
// Tools
// =============================================================================
@import "node_modules/sonatacss/sass/2-tools/_functions";
@import "node_modules/sonatacss/sass/2-tools/_aspect-ratio";
@import "node_modules/sonatacss/sass/2-tools/_button";
@import "node_modules/sonatacss/sass/2-tools/_clearfix";
@import "node_modules/sonatacss/sass/2-tools/_disabled";
@import "node_modules/sonatacss/sass/2-tools/_grid";
@import "node_modules/sonatacss/sass/2-tools/_media";
@import "node_modules/sonatacss/sass/2-tools/_position";
@import "node_modules/sonatacss/sass/2-tools/_screen";
@import "node_modules/sonatacss/sass/2-tools/_table-responsive";
@import "node_modules/sonatacss/sass/2-tools/_table-striped";
@import "node_modules/sonatacss/sass/2-tools/_truncate";
@import "node_modules/sonatacss/sass/2-tools/_visually-hidden";
// Generic
// =============================================================================
@import "node_modules/sonatacss/sass/3-generic/_box-sizing";
@import "node_modules/sonatacss/sass/3-generic/_normalize";
@import "node_modules/sonatacss/sass/3-generic/_base";
// Elements
// =============================================================================
@import "node_modules/sonatacss/sass/4-elements/_page";
@import "node_modules/sonatacss/sass/4-elements/_buttons";
@import "node_modules/sonatacss/sass/4-elements/_forms";
@import "node_modules/sonatacss/sass/4-elements/_lists";
@import "node_modules/sonatacss/sass/4-elements/_text";
// Abstractions
// =============================================================================
@import "node_modules/sonatacss/sass/5-abstractions/_animations";
@import "node_modules/sonatacss/sass/5-abstractions/_container";
@import "node_modules/sonatacss/sass/5-abstractions/_form-control";
@import "node_modules/sonatacss/sass/5-abstractions/_grid";
@import "node_modules/sonatacss/sass/5-abstractions/_list-bare";
@import "node_modules/sonatacss/sass/5-abstractions/_list-inline";
@import "node_modules/sonatacss/sass/5-abstractions/_list-spaced";
@import "node_modules/sonatacss/sass/5-abstractions/_media";
@import "node_modules/sonatacss/sass/5-abstractions/_ratio";
@import "node_modules/sonatacss/sass/5-abstractions/_table-scrollable";
@import "node_modules/sonatacss/sass/5-abstractions/_text";
@import "node_modules/sonatacss/sass/5-abstractions/_validation-icons";
// Components
// =============================================================================
@import "node_modules/sonatacss/sass/6-components/_alerts";
@import "node_modules/sonatacss/sass/6-components/_buttons";
@import "node_modules/sonatacss/sass/6-components/_checkbox";
@import "node_modules/sonatacss/sass/6-components/_form-field";
@import "node_modules/sonatacss/sass/6-components/_form-file";
@import "node_modules/sonatacss/sass/6-components/_form-switch";
@import "node_modules/sonatacss/sass/6-components/_radio";
@import "node_modules/sonatacss/sass/6-components/_section";
@import "node_modules/sonatacss/sass/6-components/_tables";
// Utilities
// =============================================================================
@import "node_modules/sonatacss/sass/7-utilities/_print";
@import "node_modules/sonatacss/sass/7-utilities/_background";
@import "node_modules/sonatacss/sass/7-utilities/_border";
@import "node_modules/sonatacss/sass/7-utilities/_display";
@import "node_modules/sonatacss/sass/7-utilities/_flex";
@import "node_modules/sonatacss/sass/7-utilities/_float";
@import "node_modules/sonatacss/sass/7-utilities/_margin";
@import "node_modules/sonatacss/sass/7-utilities/_max-width";
@import "node_modules/sonatacss/sass/7-utilities/_overflow";
@import "node_modules/sonatacss/sass/7-utilities/_padding";
@import "node_modules/sonatacss/sass/7-utilities/_position";
@import "node_modules/sonatacss/sass/7-utilities/_shadow";
@import "node_modules/sonatacss/sass/7-utilities/_svg";
@import "node_modules/sonatacss/sass/7-utilities/_table-layout";
@import "node_modules/sonatacss/sass/7-utilities/_width";
@import "node_modules/sonatacss/sass/7-utilities/_text";
@import "node_modules/sonatacss/sass/7-utilities/_vertical-alignment";
@import "node_modules/sonatacss/sass/7-utilities/_visibility";
Be aware that the settings and tools layers contain variables and mixins that are used by files in the subsequent layers, so removing lines from those layers it’s not recommended.
$color-primary, $font-family-primary, $font-family-headingsand $responsive-utilities variables, at least. You can do this by declaring the variables before importing the settingslayer, like this:// ...
$color-primary: #502a7a;
$font-family: "Lato", sans-serif;
@import "node_modules/sonatacss/layers/settings";
// ...
components layer. Place your code or imports in the appropriate layer, after Sonata files for that specific layer, like this:// ...
@import "node_modules/sonatacss/layers/abstractions";
@import "node_modules/sonatacss/layers/components";
@import "components/my-component";
@import "components/another-component";
@import "node_modules/sonatacss/layers/utilities";
// ...
All classes and settings are documented in the source files. A proper documentation site will be available once the framework is more stable.
Sonata supports the latest stable versions of all major browsers (Chrome, Edge, Firefox, Opera, Safari) and the latest Firefox ESR version.
Internet Explorer and Opera Mini are not supported.
Our current browserslist is:
"> 0.5%",
"last 2 major versions",
"not dead",
"Firefox ESR",
"not Explorer <= 11",
"not OperaMini all"
Sonata takes ideas or inspiration from other projects made by awesome people:
table-responsive mixin is based on this article by Chris Coyier.position mixin and a couple of internal functions.Released under the MIT License.
FAQs
A responsive CSS framework based on ITCSS architecture and BEM methodology.
We found that sonatacss demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.