2
0

core.scss 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. /* =============================================================================
  2. /* Wagtail CMS main stylesheet
  3. /* =============================================================================
  4. REFERENCE
  5. * We organise 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 │
  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 │ Unused │ 5 Objects │
  17. │ components │ classes │ 6 Components │
  18. │ │ BEM blocks │ │
  19. │ overrides │ classes │ 7 Trumps │
  20. │ │ overrides, utilities │ │
  21. └────────────┴────────────────────────┴──────────────┘
  22. SCSS: https://sass-lang.com/guide
  23. ITCSS: https://www.creativebloq.com/web-design/manage-large-css-projects-itcss-101517528
  24. Sass 7-1 pattern: https://gist.github.com/rveitch/84cea9650092119527bc
  25. BEM: https://getbem.com/
  26. ==============================================================================*/
  27. /* Legacy vendor styles. Do not add new styles here. */
  28. @use 'generic/normalize';
  29. @use 'vendor/jquery-ui-1.10.3.verdant';
  30. @use 'vendor/jquery.tagit' as tagit;
  31. @use 'vendor/jquery.Jcrop.min' as jcrop;
  32. /* SETTINGS
  33. These are variables, maps, and fonts.
  34. * No CSS should be produced by these files
  35. */
  36. @import 'settings';
  37. /* TOOLS
  38. These are functions and mixins.
  39. * No CSS should be produced by these files.
  40. */
  41. @import 'tools';
  42. /* GENERIC
  43. This is for resets and other rules that affect large collections of bare elements.
  44. * Changes to them should be very rare.
  45. */
  46. /* ELEMENTS
  47. These are base styles for bare HTML elements.
  48. * Changes to them should be very rare.
  49. */
  50. // These inject Tailwind's base, component and utility styles and any styles registered by plugins of each layer.
  51. // Unused styles created within tailwinds layers won't be compiled into the compiled stylesheet
  52. // https://tailwindcss.com/docs/adding-custom-styles#using-css-and-layer
  53. @tailwind base;
  54. @tailwind components;
  55. @import 'elements/elements';
  56. @import 'elements/typography';
  57. @import 'elements/forms';
  58. /* COMPONENTS
  59. These are classes for components.
  60. * These classes (unless legacy) are prefixed with `.w-`.
  61. * React component styles live in the same folders as their React components,
  62. which is the preferred pattern over housing them in the scss folder.
  63. */
  64. @import '../src/components/Transition/Transition';
  65. @import '../src/components/LoadingSpinner/LoadingSpinner';
  66. @import '../src/components/PublicationStatus/PublicationStatus';
  67. @import '../src/components/ComboBox/ComboBox';
  68. @import '../src/components/PageExplorer/PageExplorer';
  69. @import '../src/components/CommentApp/main';
  70. @import 'components/avatar';
  71. @import 'components/icons';
  72. @import 'components/forms/input-base';
  73. @import 'components/forms/input-text';
  74. @import 'components/forms/radio-checkbox';
  75. @import 'components/forms/select';
  76. @import 'components/forms/tagit';
  77. @import 'components/forms/radio-checkbox-multiple';
  78. @import 'components/forms/error-message';
  79. @import 'components/forms/required-mark';
  80. @import 'components/forms/help';
  81. @import 'components/forms/drop-zone';
  82. @import 'components/forms/daterange';
  83. @import 'components/forms/file';
  84. @import 'components/forms/publishing';
  85. @import 'components/forms/switch';
  86. @import 'components/forms/title';
  87. @import 'components/forms/field';
  88. @import 'components/forms/field-row';
  89. @import 'components/forms/field-comment-control';
  90. @import 'components/forms/field-textoutput';
  91. @import 'components/forms/form-width';
  92. @import 'components/forms/nested-panel';
  93. @import 'components/tabs';
  94. @import 'components/panel';
  95. @import 'components/dialog';
  96. @import 'components/dismissible';
  97. @import 'components/drilldown';
  98. @import 'components/dropdown';
  99. @import 'components/dropdown-button';
  100. @import 'components/help-block';
  101. @import 'components/button';
  102. @import 'components/keyboard-shortcuts';
  103. @import 'components/modals';
  104. @import 'components/chooser';
  105. @import 'components/tag';
  106. @import 'components/listing';
  107. @import 'components/filters';
  108. @import 'components/messages';
  109. @import 'components/messages.capability';
  110. @import 'components/messages.status';
  111. @import 'components/header';
  112. @import 'components/progressbar';
  113. @import 'components/summary';
  114. @import 'components/whats-new';
  115. @import 'components/grid.legacy';
  116. @import 'components/footer';
  117. @import 'components/loading-mask';
  118. @import 'components/human-readable-date';
  119. @import 'components/link.legacy';
  120. @import 'components/indicator';
  121. @import 'components/status-tag';
  122. @import 'components/skiplink';
  123. @import 'components/workflow-tasks';
  124. @import 'components/workflow-timeline';
  125. @import 'components/bulk_actions';
  126. @import 'components/preview-panel';
  127. @import 'components/preview-error';
  128. @import 'components/form-side';
  129. @import 'components/a11y-result';
  130. @import 'components/userbar';
  131. @import 'components/breadcrumbs';
  132. @import 'components/pill';
  133. @import 'components/ping';
  134. @import 'components/editing-sessions';
  135. @import '../src/components/Sidebar/Sidebar';
  136. @import '../src/components/Minimap/Minimap';
  137. /* OVERRIDES
  138. These are classes that provide overrides.
  139. * Higher specificity is allowed here because these are overrides and imported last.
  140. */
  141. // VENDOR: overrides of vendor styles.
  142. @import 'overrides/vendor.datetimepicker';
  143. @import 'overrides/vendor.handsontable';
  144. @import 'overrides/vendor.tagit';
  145. @import 'overrides/vendor.tippy';
  146. // UTILITIES: classes that do one simple thing.
  147. @import 'overrides/utilities.focus';
  148. // Legacy utilities
  149. @import 'overrides/utilities.legacy';
  150. // TAILWIND: This is at the bottom so it can take precedence over other css classes
  151. @tailwind utilities;
  152. /* Legacy layout-specific styles. Do not add new styles here. */
  153. @import 'layouts/404';
  154. @import 'layouts/compare-revisions';
  155. @import 'layouts/login';
  156. @import 'layouts/account';
  157. @import 'layouts/workflow-progress';
  158. @import 'layouts/report';
  159. @import 'layouts/add-multiple';
  160. @import 'layouts/chooser-duplicate-upload';
  161. @import 'layouts/focal-point-chooser';
  162. @import 'layouts/redirects';