_elements.scss 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // These inject Tailwind's base and component styles and any styles registered by plugins of each layer.
  2. // Unused styles created within tailwinds layers won't be compiled into the compiled stylesheet
  3. // https://tailwindcss.com/docs/adding-custom-styles#using-css-and-layer
  4. @tailwind base;
  5. @tailwind components;
  6. *,
  7. ::before,
  8. ::after {
  9. // Reset border styles so tailwinds default border class works as expected
  10. // https://tailwindcss.com/docs/preflight#border-styles-are-reset-globally
  11. border-width: 0;
  12. border-style: solid;
  13. // Set all elements to inherit their parent’s (border-box) box-sizing.
  14. box-sizing: inherit;
  15. }
  16. ::before,
  17. ::after {
  18. --tw-content: '';
  19. }
  20. // Default to LTR if `dir` is not set.
  21. :root,
  22. :host,
  23. [dir='ltr'] {
  24. // Flips the direction based on whether the UI is LTR or RTL. Used for:
  25. // - `transform` / `background-position` declarations for layout
  26. // - icons mirroring.
  27. // - Any other styles built with physical properties or values to mirror for RTL languages.
  28. --w-direction-factor: 1;
  29. }
  30. [dir='rtl'] {
  31. --w-direction-factor: -1;
  32. }
  33. html {
  34. height: 100%;
  35. // Set the whole admin to border-box by default.
  36. box-sizing: border-box;
  37. // Display viewport overscroll areas in a theme-appropriate color.
  38. background-color: theme('colors.surface-page');
  39. }
  40. body {
  41. overflow-x: hidden;
  42. position: relative;
  43. &:after {
  44. content: '';
  45. position: fixed;
  46. transition:
  47. visibility 0s linear 0s,
  48. opacity 0.2s ease-out;
  49. background: theme('colors.white-50');
  50. width: 100%;
  51. height: 100%;
  52. top: 0;
  53. inset-inline-start: 0;
  54. z-index: 5;
  55. opacity: 0;
  56. visibility: hidden;
  57. }
  58. }
  59. hr {
  60. border: 1px solid theme('colors.border-furniture');
  61. border-width: 1px 0 0;
  62. margin: 1.5em 0;
  63. }
  64. // general image style
  65. img {
  66. max-width: 100%;
  67. height: auto;
  68. }