core.scss 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. /* SETTINGS
  36. These are variables, maps, and fonts.
  37. * No CSS should be produced by these files
  38. */
  39. @import 'settings';
  40. /* TOOLS
  41. These are functions and mixins.
  42. * No CSS should be produced by these files.
  43. */
  44. @import 'tools';
  45. /* GENERIC
  46. This is for resets and other rules that affect large collections of bare elements.
  47. * Changes to them should be very rare.
  48. */
  49. // @import 'generic/generic';
  50. /* ELEMENTS
  51. These are base styles for bare HTML elements.
  52. * Changes to them should be very rare.
  53. */
  54. @import 'elements/elements';
  55. @import 'elements/typography';
  56. @import 'elements/forms';
  57. @import 'elements/root';
  58. /* OBJECTS
  59. These are classes related to layout, known as 'objects' in ITCSS or OOCSS.
  60. * This is for grids, wrappers, and other non-consmetic layout utilities.
  61. * These classes are prefixed with `.o-`.
  62. */
  63. @import 'objects/objects';
  64. @import 'objects/avatar';
  65. /* COMPONENTS
  66. These are classes for components.
  67. * These classes (unless legacy) are prefixed with `.c-`.
  68. * React component styles live in the same folders as their React components,
  69. which is the preferred pattern over housing them in the scss folder.
  70. */
  71. @import '../src/components/Transition/Transition';
  72. @import '../src/components/LoadingSpinner/LoadingSpinner';
  73. @import '../src/components/PublicationStatus/PublicationStatus';
  74. @import '../src/components/Explorer/Explorer';
  75. @import '../src/components/CommentApp/main';
  76. // Legacy
  77. @import 'components/icons';
  78. @import 'components/tabs';
  79. @import 'components/dropdown';
  80. @import 'components/dropdown.legacy';
  81. @import 'components/help-block';
  82. @import 'components/modals';
  83. @import 'components/forms';
  84. @import 'components/button';
  85. @import 'components/chooser';
  86. @import 'components/tag';
  87. @import 'components/listing';
  88. @import 'components/messages';
  89. @import 'components/messages.capability';
  90. @import 'components/messages.status';
  91. @import 'components/header';
  92. @import 'components/progressbar';
  93. @import 'components/main-nav';
  94. @import 'components/indicator';
  95. @import 'components/tooltips';
  96. @import 'components/logo';
  97. @import 'components/grid.legacy';
  98. @import 'components/breadcrumb';
  99. @import 'components/footer';
  100. @import 'components/loading-mask';
  101. @import 'components/media-placeholder';
  102. @import 'components/human-readable-date';
  103. @import 'components/link.legacy';
  104. @import 'components/privacy-indicator';
  105. @import 'components/status-tag';
  106. @import 'components/button-select';
  107. @import 'components/skiplink';
  108. @import 'components/workflow-tasks';
  109. @import 'components/switch';
  110. @import 'components/comments-controls';
  111. @import 'components/comments-notification-dropdown';
  112. @import 'components/bulk_actions';
  113. /* OVERRIDES
  114. These are classes that provide overrides.
  115. * Higher specificity is allowed here because these are overrides and imported last.
  116. */
  117. // VENDOR: overrides of vendor styles.
  118. @import 'overrides/vendor.datetimepicker';
  119. @import 'overrides/vendor.tagit';
  120. // UTILITIES: classes that do one simple thing.
  121. @import 'overrides/utilities.hidden';
  122. @import 'overrides/utilities.text';
  123. @import 'overrides/utilities.dropdowns';
  124. @import 'overrides/utilities.focus';
  125. @import 'overrides/utilities.visuallyhidden';
  126. // Legacy utilities
  127. @import 'overrides/utilities.text.legacy';
  128. @import 'overrides/utilities.legacy';
  129. // PAGES: page-specific overrides
  130. @import 'overrides/pages.homepage';
  131. @import 'overrides/pages.page-explorer';