Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-atroot

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-atroot

PostCSS plugin to place rules directly at the root

  • 0.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
73K
increased by1.83%
Maintainers
1
Weekly downloads
 
Created
Source

PostCSS at-root Circle CI

PostCSS plugin to place rules directly at the root node.

The @at-root causes one or more rules to be emitted at the root of the document, rather than being nested beneath their parent selectors:

.parent {
  ...
  @at-root{
    .child {...}
  }
}

Which would produce:

.child { ... }
.parent { ... }

It will play well with postcss @include plugins.
foo.css:

@at-root {
  @viewport { width: device-width; }
}
.foo {
  color: blue;
}

bar.css:

.bar {
  @import "foo.css";
}

Will produce:

@viewport { width: device-width; }

.bar .foo {
  color: blue; 
}

Usage

postcss([ require('postcss-atroot')() ])

See PostCSS docs for examples for your environment.

Keywords

FAQs

Package last updated on 24 May 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc