2
0

core.scss 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /* =============================================================================
  2. /* Wagtail CMS main stylesheet
  3. /* =============================================================================
  4. REFERENCE
  5. * We organize our styles based on a combination of ITCSS and
  6. the Sass 7-1 pattern.
  7. * Classes should be written using BEM, which we modify to include a prefix.
  8. * Every BEM block should have its own file.
  9. ┌────────────┬────────────────────────┬──────────────┬────────┐
  10. │ Folder │ Contents │ ITCSS level │ Prefix │
  11. ├────────────┼────────────────────────┼──────────────┼────────┤
  12. │ settings │ variables, maps, fonts │ 1 Settings │ │
  13. │ tools │ mixins, functions │ 2 Tools │ │
  14. │ generic │ resets │ 3 Generic │ │
  15. │ elements │ elements, no classes │ 4 Elements │ │
  16. │ objects │ classes │ 5 Objects │ o- │
  17. │ │ layout │ │ │
  18. │ components │ classes │ 6 Components │ c- │
  19. │ │ BEM blocks │ │ │
  20. │ overrides │ classes │ 7 Trumps │ u- │
  21. │ │ overrides, utilities │ │ │
  22. └────────────┴────────────────────────┴──────────────┴────────┘
  23. SCSS: https://sass-lang.com/guide
  24. ITCSS: https://www.creativebloq.com/web-design/manage-large-css-projects-itcss-101517528
  25. Sass 7-1 pattern: https://gist.github.com/rveitch/84cea9650092119527bc
  26. BEM: http://getbem.com/
  27. OTHER PREFIXES
  28. ┌────────┬─────────┐
  29. │ Prefix │ Purpose │
  30. ├────────┼─────────┤
  31. │ t- │ theme │
  32. │ is- │ state │
  33. └────────┴─────────┘
  34. ==============================================================================*/
  35. /* TAILWIND BASE
  36. These inject Tailwind's base, component and utility styles and any styles registered by plugins of each layer.
  37. Unused styles created within tailwinds layers won't be compiled into the compiled stylesheet
  38. https://tailwindcss.com/docs/adding-custom-styles#using-css-and-layer
  39. */
  40. @tailwind base;
  41. @tailwind components;
  42. /* SETTINGS
  43. These are variables, maps, and fonts.
  44. * No CSS should be produced by these files
  45. */
  46. @import 'settings';
  47. /* TOOLS
  48. These are functions and mixins.
  49. * No CSS should be produced by these files.
  50. */
  51. @import 'tools';
  52. /* GENERIC
  53. This is for resets and other rules that affect large collections of bare elements.
  54. * Changes to them should be very rare.
  55. */
  56. // @import 'generic/generic';
  57. /* ELEMENTS
  58. These are base styles for bare HTML elements.
  59. * Changes to them should be very rare.
  60. */
  61. @import 'elements/elements';
  62. @import 'elements/typography';
  63. @import 'elements/forms';
  64. @import 'elements/root';
  65. /* OBJECTS
  66. These are classes related to layout, known as 'objects' in ITCSS or OOCSS.
  67. * This is for grids, wrappers, and other non-consmetic layout utilities.
  68. * These classes are prefixed with `.o-`.
  69. */
  70. @import 'objects/objects';
  71. @import 'objects/avatar';
  72. /* COMPONENTS
  73. These are classes for components.
  74. * These classes (unless legacy) are prefixed with `.c-`.
  75. * React component styles live in the same folders as their React components,
  76. which is the preferred pattern over housing them in the scss folder.
  77. */
  78. @import '../src/components/Transition/Transition';
  79. @import '../src/components/LoadingSpinner/LoadingSpinner';
  80. @import '../src/components/PublicationStatus/PublicationStatus';
  81. @import '../src/components/Explorer/Explorer';
  82. @import '../src/components/CommentApp/main';
  83. // Legacy
  84. @import 'components/icons';
  85. @import 'components/tabs';
  86. @import 'components/dropdown';
  87. @import 'components/dropdown.legacy';
  88. @import 'components/help-block';
  89. @import 'components/modals';
  90. @import 'components/forms';
  91. @import 'components/button';
  92. @import 'components/chooser';
  93. @import 'components/tag';
  94. @import 'components/listing';
  95. @import 'components/messages';
  96. @import 'components/messages.capability';
  97. @import 'components/messages.status';
  98. @import 'components/header';
  99. @import 'components/progressbar';
  100. @import 'components/main-nav';
  101. @import 'components/tooltips';
  102. @import 'components/logo';
  103. @import 'components/grid.legacy';
  104. @import 'components/breadcrumb';
  105. @import 'components/footer';
  106. @import 'components/loading-mask';
  107. @import 'components/media-placeholder';
  108. @import 'components/human-readable-date';
  109. @import 'components/link.legacy';
  110. @import 'components/privacy-indicator';
  111. @import 'components/status-tag';
  112. @import 'components/button-select';
  113. @import 'components/skiplink';
  114. @import 'components/workflow-tasks';
  115. @import 'components/switch';
  116. @import 'components/comments-controls';
  117. @import 'components/comments-notification-dropdown';
  118. @import 'components/bulk_actions';
  119. /* OVERRIDES
  120. These are classes that provide overrides.
  121. * Higher specificity is allowed here because these are overrides and imported last.
  122. */
  123. // VENDOR: overrides of vendor styles.
  124. @import 'overrides/vendor.datetimepicker';
  125. @import 'overrides/vendor.tagit';
  126. // UTILITIES: classes that do one simple thing.
  127. @import 'overrides/utilities.hidden';
  128. @import 'overrides/utilities.dropdowns';
  129. @import 'overrides/utilities.focus';
  130. @import 'overrides/utilities.visuallyhidden';
  131. // Legacy utilities
  132. @import 'overrides/utilities.legacy';
  133. // TAILWIND: This is at the bottom so it can take precedence over other css classes
  134. @tailwind utilities;