You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_root.scss 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. :root,
  2. [data-bs-theme="light"] {
  3. // Note: Custom variable values only support SassScript inside `#{}`.
  4. // Colors
  5. //
  6. // Generate palettes for full colors, grays, and theme colors.
  7. @each $color, $value in $colors {
  8. --#{$prefix}#{$color}: #{$value};
  9. }
  10. @each $color, $value in $grays {
  11. --#{$prefix}gray-#{$color}: #{$value};
  12. }
  13. @each $color, $value in $theme-colors {
  14. --#{$prefix}#{$color}: #{$value};
  15. }
  16. @each $color, $value in $theme-colors-rgb {
  17. --#{$prefix}#{$color}-rgb: #{$value};
  18. }
  19. @each $color, $value in $theme-colors-text {
  20. --#{$prefix}#{$color}-text-emphasis: #{$value};
  21. }
  22. @each $color, $value in $theme-colors-bg-subtle {
  23. --#{$prefix}#{$color}-bg-subtle: #{$value};
  24. }
  25. @each $color, $value in $theme-colors-border-subtle {
  26. --#{$prefix}#{$color}-border-subtle: #{$value};
  27. }
  28. --#{$prefix}white-rgb: #{to-rgb($white)};
  29. --#{$prefix}black-rgb: #{to-rgb($black)};
  30. // Fonts
  31. // Note: Use `inspect` for lists so that quoted items keep the quotes.
  32. // See https://github.com/sass/sass/issues/2383#issuecomment-336349172
  33. --#{$prefix}font-sans-serif: #{inspect($font-family-sans-serif)};
  34. --#{$prefix}font-monospace: #{inspect($font-family-monospace)};
  35. --#{$prefix}gradient: #{$gradient};
  36. // Root and body
  37. // scss-docs-start root-body-variables
  38. @if $font-size-root != null {
  39. --#{$prefix}root-font-size: #{$font-size-root};
  40. }
  41. --#{$prefix}body-font-family: #{inspect($font-family-base)};
  42. @include rfs($font-size-base, --#{$prefix}body-font-size);
  43. --#{$prefix}body-font-weight: #{$font-weight-base};
  44. --#{$prefix}body-line-height: #{$line-height-base};
  45. @if $body-text-align != null {
  46. --#{$prefix}body-text-align: #{$body-text-align};
  47. }
  48. --#{$prefix}body-color: #{$body-color};
  49. --#{$prefix}body-color-rgb: #{to-rgb($body-color)};
  50. --#{$prefix}body-bg: #{$body-bg};
  51. --#{$prefix}body-bg-rgb: #{to-rgb($body-bg)};
  52. --#{$prefix}emphasis-color: #{$body-emphasis-color};
  53. --#{$prefix}emphasis-color-rgb: #{to-rgb($body-emphasis-color)};
  54. --#{$prefix}secondary-color: #{$body-secondary-color};
  55. --#{$prefix}secondary-color-rgb: #{to-rgb($body-secondary-color)};
  56. --#{$prefix}secondary-bg: #{$body-secondary-bg};
  57. --#{$prefix}secondary-bg-rgb: #{to-rgb($body-secondary-bg)};
  58. --#{$prefix}tertiary-color: #{$body-tertiary-color};
  59. --#{$prefix}tertiary-color-rgb: #{to-rgb($body-tertiary-color)};
  60. --#{$prefix}tertiary-bg: #{$body-tertiary-bg};
  61. --#{$prefix}tertiary-bg-rgb: #{to-rgb($body-tertiary-bg)};
  62. // scss-docs-end root-body-variables
  63. --#{$prefix}heading-color: #{$headings-color};
  64. --#{$prefix}link-color: #{$link-color};
  65. --#{$prefix}link-color-rgb: #{to-rgb($link-color)};
  66. --#{$prefix}link-decoration: #{$link-decoration};
  67. --#{$prefix}link-hover-color: #{$link-hover-color};
  68. --#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover-color)};
  69. @if $link-hover-decoration != null {
  70. --#{$prefix}link-hover-decoration: #{$link-hover-decoration};
  71. }
  72. --#{$prefix}code-color: #{$code-color};
  73. --#{$prefix}highlight-color: #{$mark-color};
  74. --#{$prefix}highlight-bg: #{$mark-bg};
  75. // scss-docs-start root-border-var
  76. --#{$prefix}border-width: #{$border-width};
  77. --#{$prefix}border-style: #{$border-style};
  78. --#{$prefix}border-color: #{$border-color};
  79. --#{$prefix}border-color-translucent: #{$border-color-translucent};
  80. --#{$prefix}border-radius: #{$border-radius};
  81. --#{$prefix}border-radius-sm: #{$border-radius-sm};
  82. --#{$prefix}border-radius-lg: #{$border-radius-lg};
  83. --#{$prefix}border-radius-xl: #{$border-radius-xl};
  84. --#{$prefix}border-radius-xxl: #{$border-radius-xxl};
  85. --#{$prefix}border-radius-2xl: var(--#{$prefix}border-radius-xxl); // Deprecated in v5.3.0 for consistency
  86. --#{$prefix}border-radius-pill: #{$border-radius-pill};
  87. // scss-docs-end root-border-var
  88. --#{$prefix}box-shadow: #{$box-shadow};
  89. --#{$prefix}box-shadow-sm: #{$box-shadow-sm};
  90. --#{$prefix}box-shadow-lg: #{$box-shadow-lg};
  91. --#{$prefix}box-shadow-inset: #{$box-shadow-inset};
  92. // Focus styles
  93. // scss-docs-start root-focus-variables
  94. --#{$prefix}focus-ring-width: #{$focus-ring-width};
  95. --#{$prefix}focus-ring-opacity: #{$focus-ring-opacity};
  96. --#{$prefix}focus-ring-color: #{$focus-ring-color};
  97. // scss-docs-end root-focus-variables
  98. // scss-docs-start root-form-validation-variables
  99. --#{$prefix}form-valid-color: #{$form-valid-color};
  100. --#{$prefix}form-valid-border-color: #{$form-valid-border-color};
  101. --#{$prefix}form-invalid-color: #{$form-invalid-color};
  102. --#{$prefix}form-invalid-border-color: #{$form-invalid-border-color};
  103. // scss-docs-end root-form-validation-variables
  104. }
  105. @if $enable-dark-mode {
  106. @include color-mode(dark, true) {
  107. color-scheme: dark;
  108. // scss-docs-start root-dark-mode-vars
  109. --#{$prefix}body-color: #{$body-color-dark};
  110. --#{$prefix}body-color-rgb: #{to-rgb($body-color-dark)};
  111. --#{$prefix}body-bg: #{$body-bg-dark};
  112. --#{$prefix}body-bg-rgb: #{to-rgb($body-bg-dark)};
  113. --#{$prefix}emphasis-color: #{$body-emphasis-color-dark};
  114. --#{$prefix}emphasis-color-rgb: #{to-rgb($body-emphasis-color-dark)};
  115. --#{$prefix}secondary-color: #{$body-secondary-color-dark};
  116. --#{$prefix}secondary-color-rgb: #{to-rgb($body-secondary-color-dark)};
  117. --#{$prefix}secondary-bg: #{$body-secondary-bg-dark};
  118. --#{$prefix}secondary-bg-rgb: #{to-rgb($body-secondary-bg-dark)};
  119. --#{$prefix}tertiary-color: #{$body-tertiary-color-dark};
  120. --#{$prefix}tertiary-color-rgb: #{to-rgb($body-tertiary-color-dark)};
  121. --#{$prefix}tertiary-bg: #{$body-tertiary-bg-dark};
  122. --#{$prefix}tertiary-bg-rgb: #{to-rgb($body-tertiary-bg-dark)};
  123. @each $color, $value in $theme-colors-text-dark {
  124. --#{$prefix}#{$color}-text-emphasis: #{$value};
  125. }
  126. @each $color, $value in $theme-colors-bg-subtle-dark {
  127. --#{$prefix}#{$color}-bg-subtle: #{$value};
  128. }
  129. @each $color, $value in $theme-colors-border-subtle-dark {
  130. --#{$prefix}#{$color}-border-subtle: #{$value};
  131. }
  132. --#{$prefix}heading-color: #{$headings-color-dark};
  133. --#{$prefix}link-color: #{$link-color-dark};
  134. --#{$prefix}link-hover-color: #{$link-hover-color-dark};
  135. --#{$prefix}link-color-rgb: #{to-rgb($link-color-dark)};
  136. --#{$prefix}link-hover-color-rgb: #{to-rgb($link-hover-color-dark)};
  137. --#{$prefix}code-color: #{$code-color-dark};
  138. --#{$prefix}highlight-color: #{$mark-color-dark};
  139. --#{$prefix}highlight-bg: #{$mark-bg-dark};
  140. --#{$prefix}border-color: #{$border-color-dark};
  141. --#{$prefix}border-color-translucent: #{$border-color-translucent-dark};
  142. --#{$prefix}form-valid-color: #{$form-valid-color-dark};
  143. --#{$prefix}form-valid-border-color: #{$form-valid-border-color-dark};
  144. --#{$prefix}form-invalid-color: #{$form-invalid-color-dark};
  145. --#{$prefix}form-invalid-border-color: #{$form-invalid-border-color-dark};
  146. // scss-docs-end root-dark-mode-vars
  147. }
  148. }