Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. import { StyleSheet } from 'aphrodite/no-important';
  2. const globalSelectorHandler = (selector, _, generateSubtreeStyles) => {
  3. if (selector[0] !== "*") {
  4. return null;
  5. }
  6.  
  7. return generateSubtreeStyles(selector.slice(1));
  8. };
  9. const globalExtension = {selectorHandler: globalSelectorHandler};
  10. const { StyleSheet: globalStyleSheet, css: globalCss } = StyleSheet.extend([globalExtension]);
  11. const GlobalStyles = globalStyleSheet.create({
  12. globals: {
  13. '**': {
  14. boxSizing: 'border-box',
  15. '-webkit-font-smoothing': 'antialiased',
  16. '::before': {
  17. boxSizing: 'inherit',
  18. },
  19. '::after': {
  20. boxSizing: 'inherit',
  21. },
  22. },
  23. '*p': {
  24. margin: 0,
  25. },
  26. },
  27. });
  28. globalCss(GlobalStyles.globals);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement