index.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Original definitions (@types/postcss-nested)
  2. // by Maxim Vorontsov <https://github.com/VorontsovMaxim>
  3. import { PluginCreator } from 'postcss'
  4. declare namespace nested {
  5. interface Options {
  6. /**
  7. * By default, plugin will bubble only `@media`, `@supports` and `@layer`
  8. * at-rules. Use this option to add your custom at-rules to this list.
  9. */
  10. bubble?: string[]
  11. /**
  12. * By default, plugin will unwrap only `@font-face`, `@keyframes`,
  13. * and `@document` at-rules. You can add your custom at-rules
  14. * to this list by this option.
  15. */
  16. unwrap?: string[]
  17. /**
  18. * By default, plugin will strip out any empty selector generated
  19. * by intermediate nesting levels. You can set this option to `true`
  20. * to preserve them.
  21. */
  22. preserveEmpty?: boolean
  23. /**
  24. * The plugin supports the SCSS custom at-rule `@at-root` which breaks
  25. * rule blocks out of their nested position. If you want, you can choose
  26. * a new custom name for this rule in your code.
  27. */
  28. rootRuleName?: string
  29. }
  30. type Nested = PluginCreator<Options>
  31. }
  32. declare const nested: nested.Nested
  33. export = nested