-
Notifications
You must be signed in to change notification settings - Fork 23.3k
/
bootstrap_overridden.scss
229 lines (178 loc) · 9.76 KB
/
bootstrap_overridden.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
//
// Color system
//
//Restore BS4 Colors
$blue: #007bff !default;
$pink: #e83e8c !default;
$green: #28a745 !default;
$cyan: #17a2b8 !default;
$gray-900: #212529 !default;
//End Restore BS4 Colors
$white: #FFF !default;
$black: #000 !default;
// The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.0 are 3, 4.5 and 7.
// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast
// Overridden here as it is a dependency for some variables/functions afterwards
$min-contrast-ratio: $o-frontend-min-contrast-ratio !default;
// Prefix for :root CSS variables
$variable-prefix: '' !default;
// Restore negative margins disabled in BS5 by default
$enable-negative-margins: true !default;
// Customize the light and dark text colors for use in our color contrast function.
$color-contrast-dark: o-color('900') !default;
$color-contrast-light: o-color('white') !default;
// Spacing
//
// Control the default styling of most Bootstrap elements by modifying these
// variables. Mostly focused on spacing.
// You can add more entries to the $spacers map, should you need more variation.
$spacer: 1rem !default; // Need to predefine as used below
// Body
//
// Settings for the `<body>` element.
// Bootstrap uses `$body-bg` as default value for multiple variables but also in
// the creation of CSS rules (not controlled by variables). In case of Odoo
// boxed layout, `$body-bg` should thus be used to control the box background
// color so that components displayed inside are consistent (as they use the
// variable to compute some of their colors too). The background color behind
// the box will be forced by an Odoo CSS rule instead of relying on Bootstrap
// CSS rule (the <body> background color CSS rule) which uses `$body-bg`.
// In future bootstrap version (> 5.1.3), this should probably be reviewed.
// grep: BOXED_BODY_BG_ODOO
$body-bg: o-color('o-cc1-bg') !default;
$body-color: o-color('o-cc1-text') or color-contrast($body-bg) !default;
// Links
//
// Style anchor elements.
$-link-color: o-color('o-cc1-link');
$-link-color: if($-link-color, $-link-color, o-color('primary'));
$link-color: auto-contrast($-link-color, $body-bg, 'o-cc1-link') !default;
$link-hover-color: auto-contrast(darken($link-color, 15%), $body-bg, 'o-cc1-link') !default;
$link-decoration: if(o-website-value('link-underline') == 'always', underline, none) !default;
$link-hover-decoration: if(o-website-value('link-underline') != 'never', underline, none) !default;
// Table
$table-striped-bg-factor: .01 !default;
$table-cell-padding-x: .75rem !default;
$table-cell-padding-y: .75rem !default;
$table-cell-padding-x-sm: .3rem !default;
$table-cell-padding-y-sm: .3rem !default;
// Grid
$grid-gutter-width: 30px !default;
// Components
//
// Define common padding and border radius sizes and more.
// Note: for the 'active' color, color preset edition is not really flexible but
// this could come in a future update.
$component-active-bg: o-color('o-cc1-btn-primary') !default;
$component-active-color: if($component-active-bg, color-contrast($component-active-bg), null) !default;
// Fonts
//
// Font, line-height, and color for body text, headings, and more.
$font-family-sans-serif: $o-theme-font !default;
$font-size-base: o-website-value('font-size-base') !default;
// The top paragraph margin is a custom variable.
$paragraph-margin-top: o-website-value('paragraph-margin-top') !default;
$paragraph-margin-bottom: o-website-value('paragraph-margin-bottom') !default;
$h1-font-size: o-website-value('h1-font-size') or $font-size-base * $o-theme-h1-font-size-multiplier !default;
$h2-font-size: o-website-value('h2-font-size') or $font-size-base * $o-theme-h2-font-size-multiplier !default;
$h3-font-size: o-website-value('h3-font-size') or $font-size-base * $o-theme-h3-font-size-multiplier !default;
$h4-font-size: o-website-value('h4-font-size') or $font-size-base * $o-theme-h4-font-size-multiplier !default;
$h5-font-size: o-website-value('h5-font-size') or $font-size-base * $o-theme-h5-font-size-multiplier !default;
$h6-font-size: o-website-value('h6-font-size') or $font-size-base * $o-theme-h6-font-size-multiplier !default;
// H2~H6 font families are custom variables.
$headings-font-family: $o-theme-headings-font !default;
$h2-font-family: $o-theme-h2-font !default;
$h3-font-family: $o-theme-h3-font !default;
$h4-font-family: $o-theme-h4-font !default;
$h5-font-family: $o-theme-h5-font !default;
$h6-font-family: $o-theme-h6-font !default;
// H2~H6 line heights are custom variables.
$headings-line-height: o-website-value('headings-line-height') !default;
$h2-line-height: o-website-value('h2-line-height') or $headings-line-height !default;
$h3-line-height: o-website-value('h3-line-height') or $headings-line-height !default;
$h4-line-height: o-website-value('h4-line-height') or $headings-line-height !default;
$h5-line-height: o-website-value('h5-line-height') or $headings-line-height !default;
$h6-line-height: o-website-value('h6-line-height') or $headings-line-height !default;
// H1~H6 top margins are custom variables.
$headings-margin-top: o-website-value('headings-margin-top') or 0 !default;
$h2-margin-top: o-website-value('h2-margin-top') or $headings-margin-top !default;
$h3-margin-top: o-website-value('h3-margin-top') or $headings-margin-top !default;
$h4-margin-top: o-website-value('h4-margin-top') or $headings-margin-top !default;
$h5-margin-top: o-website-value('h5-margin-top') or $headings-margin-top !default;
$h6-margin-top: o-website-value('h6-margin-top') or $headings-margin-top !default;
// H2~H6 bottom margins are custom variables.
$headings-margin-bottom: o-website-value('headings-margin-bottom') !default;
$h2-margin-bottom: o-website-value('h2-margin-bottom') or $headings-margin-bottom !default;
$h3-margin-bottom: o-website-value('h3-margin-bottom') or $headings-margin-bottom !default;
$h4-margin-bottom: o-website-value('h4-margin-bottom') or $headings-margin-bottom !default;
$h5-margin-bottom: o-website-value('h5-margin-bottom') or $headings-margin-bottom !default;
$h6-margin-bottom: o-website-value('h6-margin-bottom') or $headings-margin-bottom !default;
$headings-color: o-color('o-cc1-headings') !default;
$lead-font-size: 1.125rem !default;
$text-muted: mute-color($body-color) !default;
// Buttons
//
// For each of Bootstrap's buttons, define text, background, and border color.
$btn-padding-y: o-website-value('btn-padding-y') !default;
$btn-padding-x: o-website-value('btn-padding-x') !default;
$btn-font-size: o-website-value('btn-font-size') !default;
$btn-padding-y-sm: o-website-value('btn-padding-y-sm') !default;
$btn-padding-x-sm: o-website-value('btn-padding-x-sm') !default;
$btn-font-size-sm: o-website-value('btn-font-size-sm') !default;
$btn-padding-y-lg: o-website-value('btn-padding-y-lg') !default;
$btn-padding-x-lg: o-website-value('btn-padding-x-lg') !default;
$btn-font-size-lg: o-website-value('btn-font-size-lg') !default;
$btn-border-width: o-website-value('btn-border-width') !default;
$btn-border-radius: o-website-value('btn-border-radius') !default;
$btn-border-radius-lg: o-website-value('btn-border-radius-lg') !default;
$btn-border-radius-sm: o-website-value('btn-border-radius-sm') !default;
// Forms
$input-padding-y: o-website-value('input-padding-y') !default;
$input-padding-x: o-website-value('input-padding-x') !default;
$input-font-size: o-website-value('input-font-size') !default;
$input-padding-y-sm: o-website-value('input-padding-y-sm') !default;
$input-padding-x-sm: o-website-value('input-padding-x-sm') !default;
$input-font-size-sm: o-website-value('input-font-size-sm') !default;
$input-padding-y-lg: o-website-value('input-padding-y-lg') !default;
$input-padding-x-lg: o-website-value('input-padding-x-lg') !default;
$input-font-size-lg: o-website-value('input-font-size-lg') !default;
$input-border-width: o-website-value('input-border-width') !default;
$input-border-radius: o-website-value('input-border-radius') !default;
$input-border-radius-lg: o-website-value('input-border-radius-lg') !default;
$input-border-radius-sm: o-website-value('input-border-radius-sm') !default;
// Badge
$badge-padding-y: 0.25em !default;
$badge-padding-x: 0.4em !default;
// Breadcrumbs
$breadcrumb-padding-y: .75rem !default;
$breadcrumb-padding-x: 1rem !default;
// Navbar
// Increase default navbar padding for some navbar styles
$navbar-padding-x: $spacer !default;
$navbar-padding-y: if(index(('fill', 'pills', 'outline'), o-website-value('header-links-style')), ($spacer / 2) * 1.25, null) !default;
$navbar-nav-link-padding-x: if(index(('outline', 'block'), o-website-value('header-links-style')), .5rem * 3, null) !default;
$navbar-nav-link-padding-x: if(o-website-value('header-links-style') == 'border-bottom', .5rem * 2, null) !default;
// Jumbotron
$jumbotron-bg: transparent !default;
// Block Quote
$blockquote-margin-y: 0 !default;
// Bootstrap Review
$o-btn-flat-defaults: () !default;
$o-btn-outline-defaults: () !default;
$o-btn-outline-border-width-defaults: () !default;
@each $color in ('primary', 'secondary') {
@if o-website-value('btn-#{$color}-flat') {
$o-btn-flat-defaults: append($o-btn-flat-defaults, $color);
} @else if o-website-value('btn-#{$color}-outline') {
$o-btn-outline-defaults: append($o-btn-outline-defaults, $color);
$o-btn-outline-border-width-defaults: map-merge($o-btn-outline-border-width-defaults, (
$color: o-website-value('btn-#{$color}-outline-border-width'),
));
}
}
// Increase default navbar pills padding for 'pills' mode and add big radius
$o-navbar-nav-pills-link-padding-x: if(o-website-value('header-links-style') == 'pills', 1rem * 1.5, null) !default;
$o-navbar-nav-pills-link-border-radius: if(o-website-value('header-links-style') == 'pills', 10rem, null) !default;
// Accordion
$accordion-color: inherit !default;
$accordion-bg: inherit !default;