Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
2
 
3
// Reboot
4
//
5
// Normalization of HTML elements, manually forked from Normalize.css to remove
6
// styles targeting irrelevant browsers while applying new styles.
7
//
8
// Normalize is licensed MIT. https://github.com/necolas/normalize.css
9
 
10
 
11
// Document
12
//
13
// 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
14
// 2. Change the default font family in all browsers.
15
// 3. Correct the line height in all browsers.
16
// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
17
// 5. Change the default tap highlight to be completely transparent in iOS.
18
 
19
*,
20
*::before,
21
*::after {
22
  box-sizing: border-box; // 1
23
}
24
 
25
html {
26
  font-family: sans-serif; // 2
27
  line-height: 1.15; // 3
28
  text-size-adjust: 100%; // 4
29
  -webkit-text-size-adjust: 100%; // 4
30
  -webkit-tap-highlight-color: rgba($black, 0); // 5
31
}
32
 
33
// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
34
// stylelint-disable-next-line selector-list-comma-newline-after
35
article,
36
aside,
37
figcaption,
38
figure,
39
footer,
40
header,
41
hgroup,
42
main,
43
nav,
44
section {
45
  display: block;
46
}
47
 
48
// Body
49
//
50
// 1. Remove the margin in all browsers.
51
// 2. As a best practice, apply a default `background-color`.
52
// 3. Set an explicit initial text-align value so that we can later use
53
//    the `inherit` value on things like `<th>` elements.
54
 
55
body {
56
  margin: 0; // 1
57
  font-family: $font-family-base;
58
  @include font-size($font-size-base);
59
  font-weight: $font-weight-base;
60
  line-height: $line-height-base;
61
  color: $body-color;
62
  text-align: left; // 3
63
  background-color: $body-bg; // 2
64
 
65
  @include media-breakpoint-between(xs, sm) {
66
    font-size: 14px;
67
  }
68
 
69
  &.theme-dark {
70
    color: $dm-body-color;
71
    background-color: $dm-body-bg; // 2
72
  }
73
 
74
}
75
 
76
// Future-proof rule: in browsers that support :focus-visible, suppress the focus outline
77
// on elements that programmatically receive focus but wouldn't normally show a visible
78
// focus outline. In general, this would mean that the outline is only applied if the
79
// interaction that led to the element receiving programmatic focus was a keyboard interaction,
80
// or the browser has somehow determined that the user is primarily a keyboard user and/or
81
// wants focus outlines to always be presented.
82
//
83
// See https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible
84
// and https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/
85
[tabindex="-1"]:focus:not(:focus-visible) {
86
  outline-offset: 2px;
87
}
88
 
89
 
90
// Content grouping
91
//
92
// 1. Add the correct box sizing in Firefox.
93
// 2. Show the overflow in Edge and IE.
94
 
95
hr {
96
  box-sizing: content-box; // 1
97
  height: 0; // 1
98
  overflow: visible; // 2
99
}
100
 
101
.hr-xsmall {
102
  width: 30px;
103
  margin-left: auto;
104
  margin-right: auto;
105
}
106
 
107
.hr-small {
108
  width: 30px;
109
  margin: 30px auto;
110
}
111
 
112
 
113
//
114
// Typography
115
//
116
 
117
// Remove top margins from headings
118
//
119
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
120
// margin for easier control within type scales as it avoids margin collapsing.
121
// stylelint-disable-next-line selector-list-comma-newline-after
122
h1,
123
h2,
124
h3,
125
h4,
126
h5,
127
h6 {
128
  margin-top: 0;
129
  margin-bottom: $headings-margin-bottom;
130
}
131
 
132
// Reset margins on paragraphs
133
//
134
// Similarly, the top margin on `<p>`s get reset. However, we also reset the
135
// bottom margin to use `rem` units instead of `em`.
136
p {
137
  margin-top: 0;
138
  margin-bottom: $paragraph-margin-bottom;
139
 
140
  &:only-child {
141
    margin-bottom: 0;
142
  }
143
}
144
 
145
// Abbreviations
146
//
147
// 1. Duplicate behavior to the data-* attribute for our tooltip plugin
148
// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
149
// 3. Add explicit cursor to indicate changed behavior.
150
// 4. Remove the bottom border in Firefox 39-.
151
 
152
abbr[title],
153
abbr[data-original-title] {
154
  // 1
155
  cursor: help; // 3
156
  border-bottom: 0; // 4
157
}
158
 
159
address {
160
  margin-bottom: 1rem;
161
  font-style: normal;
162
  line-height: inherit;
163
}
164
 
165
ol,
166
ul,
167
dl {
168
  margin-top: 0;
169
  margin-bottom: 1rem;
170
}
171
 
172
ol ol,
173
ul ul,
174
ol ul,
175
ul ol {
176
  margin-bottom: 0;
177
}
178
 
179
dt {
180
  font-weight: $dt-font-weight;
181
}
182
 
183
dd {
184
  margin-bottom: .5rem;
185
  margin-left: 0; // Undo browser default
186
}
187
 
188
blockquote {
189
  margin: 0 0 1rem;
190
}
191
 
192
b,
193
strong {
194
  font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari
195
}
196
 
197
small {
198
  @include font-size(80%); // Add the correct font size in all browsers
199
}
200
 
201
//
202
// Prevent `sub` and `sup` elements from affecting the line height in
203
// all browsers.
204
//
205
 
206
sub,
207
sup {
208
  position: relative;
209
  @include font-size(75%);
210
  line-height: 0;
211
  vertical-align: baseline;
212
}
213
 
214
sub {
215
  bottom: -.25em;
216
}
217
 
218
sup {
219
  top: -.5em;
220
}
221
 
222
 
223
//
224
// Links
225
//
226
 
227
a {
228
  color: $link-color;
229
  text-decoration: $link-decoration;
230
  background-color: transparent; // Remove the gray background on active links in IE 10.
231
 
232
  transition: $transition-base;
233
  word-break: break-word;
234
 
235
  @include hover() {
236
    color: $link-hover-color;
237
 
238
    .theme-dark & {
239
      color: $dm-link-hover-color;
240
    }
241
  }
242
 
243
  .theme-dark & {
244
    color: $dm-link-color;
245
  }
246
}
247
 
248
// And undo these styles for placeholder links/named anchors (without href).
249
// It would be more straightforward to just use a[href] in previous block, but that
250
// causes specificity issues in many other styles that are too complex to fix.
251
// See https://github.com/twbs/bootstrap/issues/19402
252
 
253
a:not([href]):not([class]) {
254
  color: inherit;
255
  text-decoration: none;
256
 
257
  @include hover() {
258
    color: inherit;
259
    text-decoration: none;
260
  }
261
}
262
 
263
 
264
//
265
// Code
266
//
267
 
268
pre,
269
code,
270
kbd,
271
samp {
272
  font-family: $font-family-monospace;
273
  @include font-size(1rem); // Correct the odd `em` font sizing in all browsers.
274
}
275
 
276
pre {
277
  // Remove browser default top margin
278
  margin-top: 0;
279
  // Reset browser default of `1em` to use `rem`s
280
  margin-bottom: 1rem;
281
  // Don't allow content to break outside
282
  overflow: auto;
283
  // Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,
284
  // making it impossible to interact with the content
285
  -ms-overflow-style: scrollbar;
286
}
287
 
288
 
289
//
290
// Figures
291
//
292
 
293
figure {
294
  // Apply a consistent margin strategy (matches our type styles).
295
  margin: 0 0 1rem;
296
}
297
 
298
 
299
//
300
// Images and content
301
//
302
 
303
img {
304
  vertical-align: middle;
305
  border-style: none; // Remove the border on images inside links in IE 10-.
306
}
307
 
308
svg {
309
  // Workaround for the SVG overflow bug in IE10/11 is still required.
310
  // See https://github.com/twbs/bootstrap/issues/26878
311
  overflow: hidden;
312
  vertical-align: middle;
313
}
314
 
315
 
316
//
317
// Tables
318
//
319
 
320
table {
321
  border-collapse: collapse; // Prevent double borders
322
}
323
 
324
caption {
325
  padding-top: $table-cell-padding;
326
  padding-bottom: $table-cell-padding;
327
  color: $table-caption-color;
328
  text-align: left;
329
  caption-side: bottom;
330
 
331
  .theme-dark & {
332
    color: $dm-table-caption-color;
333
  }
334
}
335
 
336
// 1. Removes font-weight bold by inheriting
337
// 2. Matches default `<td>` alignment by inheriting `text-align`.
338
// 3. Fix alignment for Safari
339
 
340
th {
341
  font-weight: $table-th-font-weight; // 1
342
  text-align: inherit; // 2
343
  text-align: -webkit-match-parent; // 3
344
}
345
 
346
 
347
//
348
// Forms
349
//
350
 
351
label {
352
  // Allow labels to use `margin` for spacing.
353
  display: inline-block;
354
  margin-right: .35rem;
355
  font-weight: $font-weight-medium;
356
}
357
 
358
// Remove the default `border-radius` that macOS Chrome adds.
359
//
360
// Details at https://github.com/twbs/bootstrap/issues/24093
361
button {
362
  // stylelint-disable-next-line property-disallowed-list
363
  border-radius: 0;
364
}
365
 
366
// Explicitly remove focus outline in Chromium when it shouldn't be
367
// visible (e.g. as result of mouse click or touch tap). It already
368
// should be doing this automatically, but seems to currently be
369
// confused and applies its very visible two-tone outline anyway.
370
 
371
button:focus:not(:focus-visible) {
372
  outline-offset: 2px;
373
}
374
 
375
:focus-visible {
376
  outline: 2px solid rgba($blue-600, .9);
377
  outline-offset: 2px;
378
}
379
 
380
input,
381
button,
382
select,
383
optgroup,
384
textarea {
385
  margin: 0; // Remove the margin in Firefox and Safari
386
  font-family: inherit;
387
  @include font-size(inherit);
388
  line-height: inherit;
389
}
390
 
391
button,
392
input {
393
  overflow: visible; // Show the overflow in Edge
394
}
395
 
396
button,
397
select {
398
  text-transform: none; // Remove the inheritance of text transform in Firefox
399
}
400
 
401
// Set the cursor for non-`<button>` buttons
402
//
403
// Details at https://github.com/twbs/bootstrap/pull/30562
404
[role="button"] {
405
  cursor: pointer;
406
}
407
 
408
// Remove the inheritance of word-wrap in Safari.
409
//
410
// Details at https://github.com/twbs/bootstrap/issues/24990
411
select {
412
  word-wrap: normal;
413
}
414
 
415
 
416
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
417
//    controls in Android 4.
418
// 2. Correct the inability to style clickable types in iOS and Safari.
419
button,
420
[type="button"],
421
// 1
422
[type="reset"],
423
[type="submit"] {
424
  -webkit-appearance: button; // 2
425
}
426
 
427
// Opinionated: add "hand" cursor to non-disabled button elements.
428
@if $enable-pointer-cursor-for-buttons {
429
 
430
  button,
431
  [type="button"],
432
  [type="reset"],
433
  [type="submit"] {
434
    &:not(:disabled) {
435
      cursor: pointer;
436
    }
437
  }
438
}
439
 
440
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
441
button::-moz-focus-inner,
442
[type="button"]::-moz-focus-inner,
443
[type="reset"]::-moz-focus-inner,
444
[type="submit"]::-moz-focus-inner {
445
  padding: 0;
446
  border-style: none;
447
}
448
 
449
input[type="radio"],
450
input[type="checkbox"] {
451
  box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
452
  padding: 0; // 2. Remove the padding in IE 10-
453
}
454
 
455
input[type="radio"] {
456
  margin: 10px;
457
}
458
 
459
 
460
textarea {
461
  overflow: auto; // Remove the default vertical scrollbar in IE.
462
  // Textareas should really only resize vertically so they don't break their (horizontal) containers.
463
  resize: vertical;
464
}
465
 
466
fieldset {
467
  // Browsers set a default `min-width: min-content;` on fieldsets,
468
  // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
469
  // So we reset that to ensure fieldsets behave more like a standard block element.
470
  // See https://github.com/twbs/bootstrap/issues/12359
471
  // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
472
  min-width: 0;
473
  // Reset the default outline behavior of fieldsets so they don't affect page layout.
474
  padding: 0;
475
  margin: 0;
476
  border: 0;
477
}
478
 
479
// 1. Correct the text wrapping in Edge and IE.
480
// 2. Correct the color inheritance from `fieldset` elements in IE.
481
legend {
482
  display: block;
483
  width: 100%;
484
  max-width: 100%; // 1
485
  padding: 0;
486
  font-size: $font-size-md;
487
  font-weight: $font-weight-bold;
488
  line-height: inherit;
489
  color: inherit; // 2
490
  white-space: normal; // 1
491
}
492
 
493
progress {
494
  vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
495
}
496
 
497
// Fix height of inputs with a type of datetime-local, date, month, week, or time
498
// See https://github.com/twbs/bootstrap/issues/18842
499
 
500
::-webkit-datetime-edit-fields-wrapper,
501
::-webkit-datetime-edit-text,
502
::-webkit-datetime-edit-minute,
503
::-webkit-datetime-edit-hour-field,
504
::-webkit-datetime-edit-day-field,
505
::-webkit-datetime-edit-month-field,
506
::-webkit-datetime-edit-year-field {
507
  padding: 0;
508
}
509
 
510
::-webkit-inner-spin-button {
511
  height: auto;
512
}
513
 
514
// 1. Correct the outline style in Safari.
515
// 2. This overrides the extra rounded corners on search inputs in iOS so that our
516
//    `.form-control` class can properly style them. Note that this cannot simply
517
//    be added to `.form-control` as it's not specific enough. For details, see
518
//    https://github.com/twbs/bootstrap/issues/11586.
519
 
520
[type="search"] {
521
  outline-offset: -2px; // 1
522
  -webkit-appearance: textfield; // 2
523
}
524
 
525
// 1. A few input types should stay LTR
526
// See https://rtlstyling.com/posts/rtl-styling#form-inputs
527
// 2. RTL only output
528
// See https://rtlcss.com/learn/usage-guide/control-directives/#raw
529
 
530
/* rtl:raw:
531
[type="tel"],
532
[type="url"],
533
[type="email"],
534
[type="number"] {
535
  direction: ltr;
536
}
537
*/
538
 
539
// Remove the inner padding in Chrome and Safari on macOS.
540
 
541
::-webkit-search-decoration {
542
  -webkit-appearance: none;
543
}
544
 
545
// Remove padding around color pickers in webkit browsers
546
 
547
::-webkit-color-swatch-wrapper {
548
  padding: 0;
549
}
550
 
551
 
552
// Inherit font family and line height for file input buttons
553
 
554
::file-selector-button {
555
  font: inherit;
556
}
557
 
558
// 1. Change font properties to `inherit`
559
// 2. Correct the inability to style clickable types in iOS and Safari.
560
 
561
::-webkit-file-upload-button {
562
  font: inherit; // 1
563
  -webkit-appearance: button; // 2
564
}
565
 
566
// Correct element displays
567
output {
568
  display: inline-block;
569
}
570
 
571
// Remove border from iframe
572
 
573
iframe {
574
  border: 0;
575
}
576
 
577
// Summary
578
//
579
// 1. Add the correct display in all browsers
580
 
581
summary {
582
  display: list-item; // 1
583
  cursor: pointer;
584
}
585
 
586
 
587
// Progress
588
//
589
// Add the correct vertical alignment in Chrome, Firefox, and Opera.
590
 
591
progress {
592
  vertical-align: baseline;
593
}
594
 
595
 
596
// Hidden attribute
597
//
598
// Always hide an element with the `hidden` HTML attribute.
599
 
600
[hidden] {
601
  display: none !important;
602
}
603
 
604
 
605
$thin-scroll-bg-thumb: $gray-600 !default;
606
$thin-scroll-bg-hover: $gray-700 !default;
607
$dm-thin-scroll-bg-thumb: $dm-gray-100 !default;
608
$dm-thin-scroll-bg-hover: $dm-gray-200 !default;
609
 
610
// Thin scrollbars.
611
@mixin thin-scrolls($bg-track) {
612
 
613
  // Firefox.
614
  scrollbar-width: thin;
615
  scrollbar-color: $thin-scroll-bg-thumb $bg-track;
616
 
617
  // Chrome, Edge and Safari.
618
  &::-webkit-scrollbar {
619
    width: 12px;
620
  }
621
 
622
  &::-webkit-scrollbar-track {
623
    background: $bg-track;
624
    border-radius: 20px;
625
  }
626
 
627
  &::-webkit-scrollbar-thumb {
628
    background-color: $thin-scroll-bg-thumb;
629
    border-radius: 20px;
630
    border: 3px solid $bg-track;
631
  }
632
 
633
  &::-webkit-scrollbar-thumb:hover {
634
    background-color: $thin-scroll-bg-hover;
635
  }
636
}
637
 
638
@mixin dm-thin-scrolls($bg-track) {
639
  // Firefox.
640
  scrollbar-width: thin;
641
  scrollbar-color: $dm-thin-scroll-bg-thumb $dm-bg-track;
642
 
643
  // Chrome, Edge and Safari.
644
  &::-webkit-scrollbar {
645
    width: 12px;
646
  }
647
 
648
  &::-webkit-scrollbar-track {
649
    background: $dm-bg-track;
650
    border-radius: 20px;
651
  }
652
 
653
  &::-webkit-scrollbar-thumb {
654
    background-color: $dm-thin-scroll-bg-thumb;
655
    border-radius: 20px;
656
    border: 3px solid $dm-bg-track;
657
  }
658
 
659
  &::-webkit-scrollbar-thumb:hover {
660
    background-color: $dm-thin-scroll-bg-hover;
661
  }
662
}
663
 
664
.dark-mode:root {
665
  color-scheme: dark;
666
}