boot.gl 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,604 @@
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
+ // Document
11
+ //
12
+ // Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
13
+
14
+ *,
15
+ *::before,
16
+ *::after {
17
+ box-sizing: border-box;
18
+ }
19
+
20
+ // Root
21
+ //
22
+ // Ability to the value of the root font sizes, affecting the value of `rem`.
23
+ // null by default, thus nothing is generated.
24
+
25
+ :root {
26
+ font-size: $font-size-root;
27
+
28
+ @if $enable-smooth-scroll {
29
+ @media (prefers-reduced-motion: no-preference) {
30
+ scroll-behavior: smooth;
31
+ }
32
+ }
33
+ }
34
+
35
+ // Body
36
+ //
37
+ // 1. Remove the margin in all browsers.
38
+ // 2. As a best practice, apply a default `background-color`.
39
+ // 3. Prevent adjustments of font size after orientation changes in iOS.
40
+ // 4. Change the default tap highlight to be completely transparent in iOS.
41
+
42
+ body {
43
+ margin: 0; // 1
44
+ font-family: $font-family-base;
45
+ @include font-size($font-size-base);
46
+ font-weight: $font-weight-base;
47
+ line-height: $line-height-base;
48
+ color: $body-color;
49
+ text-align: $body-text-align;
50
+ background-color: $body-bg; // 2
51
+ -webkit-text-size-adjust: 100%; // 3
52
+ -webkit-tap-highlight-color: rgba($black, 0); // 4
53
+ }
54
+
55
+ // Content grouping
56
+ //
57
+ // 1. Reset Firefox's gray color
58
+ // 2. Set correct height and prevent the `size` attribute to make the `hr` look like an input field
59
+
60
+ hr {
61
+ margin: $hr-margin-y 0;
62
+ color: $hr-color; // 1
63
+ background-color: currentColor;
64
+ border: 0;
65
+ opacity: $hr-opacity;
66
+ }
67
+
68
+ hr:not([size]) {
69
+ height: $hr-height; // 2
70
+ }
71
+
72
+ // Typography
73
+ //
74
+ // 1. Remove top margins from headings
75
+ // By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
76
+ // margin for easier control within type scales as it avoids margin collapsing.
77
+
78
+ %heading {
79
+ margin-top: 0; // 1
80
+ margin-bottom: $headings-margin-bottom;
81
+ font-family: $headings-font-family;
82
+ font-style: $headings-font-style;
83
+ font-weight: $headings-font-weight;
84
+ line-height: $headings-line-height;
85
+ color: $headings-color;
86
+ }
87
+
88
+ h1 {
89
+ @extend %heading;
90
+ @include font-size($h1-font-size);
91
+ }
92
+
93
+ h2 {
94
+ @extend %heading;
95
+ @include font-size($h2-font-size);
96
+ }
97
+
98
+ h3 {
99
+ @extend %heading;
100
+ @include font-size($h3-font-size);
101
+ }
102
+
103
+ h4 {
104
+ @extend %heading;
105
+ @include font-size($h4-font-size);
106
+ }
107
+
108
+ h5 {
109
+ @extend %heading;
110
+ @include font-size($h5-font-size);
111
+ }
112
+
113
+ h6 {
114
+ @extend %heading;
115
+ @include font-size($h6-font-size);
116
+ }
117
+
118
+ // Reset margins on paragraphs
119
+ //
120
+ // Similarly, the top margin on `<p>`s get reset. However, we also reset the
121
+ // bottom margin to use `rem` units instead of `em`.
122
+
123
+ p {
124
+ margin-top: 0;
125
+ margin-bottom: $paragraph-margin-bottom;
126
+ }
127
+
128
+ // Abbreviations
129
+ //
130
+ // 1. Duplicate behavior to the data-bs-* attribute for our tooltip plugin
131
+ // 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari.
132
+ // 3. Add explicit cursor to indicate changed behavior.
133
+ // 4. Prevent the text-decoration to be skipped.
134
+
135
+ abbr[title],
136
+ abbr[data-bs-original-title] {
137
+ // 1
138
+ text-decoration: underline dotted; // 2
139
+ cursor: help; // 3
140
+ text-decoration-skip-ink: none; // 4
141
+ }
142
+
143
+ // Address
144
+
145
+ address {
146
+ margin-bottom: 1rem;
147
+ font-style: normal;
148
+ line-height: inherit;
149
+ }
150
+
151
+ // Lists
152
+
153
+ ol,
154
+ ul {
155
+ padding-left: 2rem;
156
+ }
157
+
158
+ ol,
159
+ ul,
160
+ dl {
161
+ margin-top: 0;
162
+ margin-bottom: 1rem;
163
+ }
164
+
165
+ ol ol,
166
+ ul ul,
167
+ ol ul,
168
+ ul ol {
169
+ margin-bottom: 0;
170
+ }
171
+
172
+ dt {
173
+ font-weight: $dt-font-weight;
174
+ }
175
+
176
+ // 1. Undo browser default
177
+
178
+ dd {
179
+ margin-bottom: 0.5rem;
180
+ margin-left: 0; // 1
181
+ }
182
+
183
+ // Blockquote
184
+
185
+ blockquote {
186
+ margin: 0 0 1rem;
187
+ }
188
+
189
+ // Strong
190
+ //
191
+ // Add the correct font weight in Chrome, Edge, and Safari
192
+
193
+ b,
194
+ strong {
195
+ font-weight: $font-weight-bolder;
196
+ }
197
+
198
+ // Small
199
+ //
200
+ // Add the correct font size in all browsers
201
+
202
+ small {
203
+ @include font-size($small-font-size);
204
+ }
205
+
206
+ // Mark
207
+
208
+ mark {
209
+ padding: $mark-padding;
210
+ background-color: $mark-bg;
211
+ }
212
+
213
+ // Sub and Sup
214
+ //
215
+ // Prevent `sub` and `sup` elements from affecting the line height in
216
+ // all browsers.
217
+
218
+ sub,
219
+ sup {
220
+ position: relative;
221
+ @include font-size($sub-sup-font-size);
222
+ line-height: 0;
223
+ vertical-align: baseline;
224
+ }
225
+
226
+ sub {
227
+ bottom: -0.25em;
228
+ }
229
+ sup {
230
+ top: -0.5em;
231
+ }
232
+
233
+ // Links
234
+
235
+ a {
236
+ color: $link-color;
237
+ text-decoration: $link-decoration;
238
+
239
+ &:hover {
240
+ color: $link-hover-color;
241
+ text-decoration: $link-hover-decoration;
242
+ }
243
+ }
244
+
245
+ // And undo these styles for placeholder links/named anchors (without href).
246
+ // It would be more straightforward to just use a[href] in previous block, but that
247
+ // causes specificity issues in many other styles that are too complex to fix.
248
+ // See https://github.com/twbs/bootstrap/issues/19402
249
+
250
+ a:not([href]):not([class]) {
251
+ &,
252
+ &:hover {
253
+ color: inherit;
254
+ text-decoration: none;
255
+ }
256
+ }
257
+
258
+ // Code
259
+
260
+ pre,
261
+ code,
262
+ kbd,
263
+ samp {
264
+ font-family: $font-family-code;
265
+ @include font-size(
266
+ 1em
267
+ ); // Correct the odd `em` font sizing in all browsers.
268
+ direction: ltr #{"/* rtl:ignore */"};
269
+ unicode-bidi: bidi-override;
270
+ }
271
+
272
+ // 1. Remove browser default top margin
273
+ // 2. Reset browser default of `1em` to use `rem`s
274
+ // 3. Don't allow content to break outside
275
+
276
+ pre {
277
+ display: block;
278
+ margin-top: 0; // 1
279
+ margin-bottom: 1rem; // 2
280
+ overflow: auto; // 3
281
+ @include font-size($code-font-size);
282
+ color: $pre-color;
283
+
284
+ // Account for some code outputs that place code tags in pre tags
285
+ code {
286
+ @include font-size(inherit);
287
+ color: inherit;
288
+ word-break: normal;
289
+ }
290
+ }
291
+
292
+ code {
293
+ @include font-size($code-font-size);
294
+ color: $code-color;
295
+ word-wrap: break-word;
296
+
297
+ // Streamline the style when inside anchors to avoid broken underline and more
298
+ a > & {
299
+ color: inherit;
300
+ }
301
+ }
302
+
303
+ kbd {
304
+ padding: $kbd-padding-y $kbd-padding-x;
305
+ @include font-size($kbd-font-size);
306
+ color: $kbd-color;
307
+ background-color: $kbd-bg;
308
+ @include border-radius($border-radius-sm);
309
+
310
+ kbd {
311
+ padding: 0;
312
+ @include font-size(1em);
313
+ font-weight: $nested-kbd-font-weight;
314
+ }
315
+ }
316
+
317
+ // Figures
318
+ //
319
+ // Apply a consistent margin strategy (matches our type styles).
320
+
321
+ figure {
322
+ margin: 0 0 1rem;
323
+ }
324
+
325
+ // Images and content
326
+
327
+ img,
328
+ svg {
329
+ vertical-align: middle;
330
+ }
331
+
332
+ // Tables
333
+ //
334
+ // Prevent double borders
335
+
336
+ table {
337
+ caption-side: bottom;
338
+ border-collapse: collapse;
339
+ }
340
+
341
+ caption {
342
+ padding-top: $table-cell-padding-y;
343
+ padding-bottom: $table-cell-padding-y;
344
+ color: $table-caption-color;
345
+ text-align: left;
346
+ }
347
+
348
+ // 1. Removes font-weight bold by inheriting
349
+ // 2. Matches default `<td>` alignment by inheriting `text-align`.
350
+ // 3. Fix alignment for Safari
351
+
352
+ th {
353
+ font-weight: $table-th-font-weight; // 1
354
+ text-align: inherit; // 2
355
+ text-align: -webkit-match-parent; // 3
356
+ }
357
+
358
+ thead,
359
+ tbody,
360
+ tfoot,
361
+ tr,
362
+ td,
363
+ th {
364
+ border-color: inherit;
365
+ border-style: solid;
366
+ border-width: 0;
367
+ }
368
+
369
+ // Forms
370
+ //
371
+ // 1. Allow labels to use `margin` for spacing.
372
+
373
+ label {
374
+ display: inline-block; // 1
375
+ }
376
+
377
+ // Remove the default `border-radius` that macOS Chrome adds.
378
+ // See https://github.com/twbs/bootstrap/issues/24093
379
+
380
+ button {
381
+ // stylelint-disable-next-line property-disallowed-list
382
+ border-radius: 0;
383
+ }
384
+
385
+ // Explicitly remove focus outline in Chromium when it shouldn't be
386
+ // visible (e.g. as result of mouse click or touch tap). It already
387
+ // should be doing this automatically, but seems to currently be
388
+ // confused and applies its very visible two-tone outline anyway.
389
+
390
+ button:focus:not(:focus-visible) {
391
+ outline: 0;
392
+ }
393
+
394
+ // 1. Remove the margin in Firefox and Safari
395
+
396
+ input,
397
+ button,
398
+ select,
399
+ optgroup,
400
+ textarea {
401
+ margin: 0; // 1
402
+ font-family: inherit;
403
+ @include font-size(inherit);
404
+ line-height: inherit;
405
+ }
406
+
407
+ // Remove the inheritance of text transform in Firefox
408
+ button,
409
+ select {
410
+ text-transform: none;
411
+ }
412
+ // Set the cursor for non-`<button>` buttons
413
+ //
414
+ // Details at https://github.com/twbs/bootstrap/pull/30562
415
+ [role="button"] {
416
+ cursor: pointer;
417
+ }
418
+
419
+ select {
420
+ // Remove the inheritance of word-wrap in Safari.
421
+ // See https://github.com/twbs/bootstrap/issues/24990
422
+ word-wrap: normal;
423
+
424
+ // Undo the opacity change from Chrome
425
+ &:disabled {
426
+ opacity: 1;
427
+ }
428
+ }
429
+
430
+ // Remove the dropdown arrow in Chrome from inputs built with datalists.
431
+ // See https://stackoverflow.com/a/54997118
432
+
433
+ [list]::-webkit-calendar-picker-indicator {
434
+ display: none;
435
+ }
436
+
437
+ // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
438
+ // controls in Android 4.
439
+ // 2. Correct the inability to style clickable types in iOS and Safari.
440
+ // 3. Opinionated: add "hand" cursor to non-disabled button elements.
441
+
442
+ button,
443
+ [type="button"], // 1
444
+ [type="reset"],
445
+ [type="submit"] {
446
+ -webkit-appearance: button; // 2
447
+
448
+ @if $enable-button-pointers {
449
+ &:not(:disabled) {
450
+ cursor: pointer; // 3
451
+ }
452
+ }
453
+ }
454
+
455
+ // Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
456
+
457
+ ::-moz-focus-inner {
458
+ padding: 0;
459
+ border-style: none;
460
+ }
461
+
462
+ // 1. Textareas should really only resize vertically so they don't break their (horizontal) containers.
463
+
464
+ textarea {
465
+ resize: vertical; // 1
466
+ }
467
+
468
+ // 1. Browsers set a default `min-width: min-content;` on fieldsets,
469
+ // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
470
+ // So we reset that to ensure fieldsets behave more like a standard block element.
471
+ // See https://github.com/twbs/bootstrap/issues/12359
472
+ // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
473
+ // 2. Reset the default outline behavior of fieldsets so they don't affect page layout.
474
+
475
+ fieldset {
476
+ min-width: 0; // 1
477
+ padding: 0; // 2
478
+ margin: 0; // 2
479
+ border: 0; // 2
480
+ }
481
+
482
+ // 1. By using `float: left`, the legend will behave like a block element.
483
+ // This way the border of a fieldset wraps around the legend if present.
484
+ // 2. Fix wrapping bug.
485
+ // See https://github.com/twbs/bootstrap/issues/29712
486
+
487
+ legend {
488
+ float: left; // 1
489
+ width: 100%;
490
+ padding: 0;
491
+ margin-bottom: $legend-margin-bottom;
492
+ @include font-size($legend-font-size);
493
+ font-weight: $legend-font-weight;
494
+ line-height: inherit;
495
+
496
+ + * {
497
+ clear: left; // 2
498
+ }
499
+ }
500
+
501
+ // Fix height of inputs with a type of datetime-local, date, month, week, or time
502
+ // See https://github.com/twbs/bootstrap/issues/18842
503
+
504
+ ::-webkit-datetime-edit-fields-wrapper,
505
+ ::-webkit-datetime-edit-text,
506
+ ::-webkit-datetime-edit-minute,
507
+ ::-webkit-datetime-edit-hour-field,
508
+ ::-webkit-datetime-edit-day-field,
509
+ ::-webkit-datetime-edit-month-field,
510
+ ::-webkit-datetime-edit-year-field {
511
+ padding: 0;
512
+ }
513
+
514
+ ::-webkit-inner-spin-button {
515
+ height: auto;
516
+ }
517
+
518
+ // 1. Correct the outline style in Safari.
519
+ // 2. This overrides the extra rounded corners on search inputs in iOS so that our
520
+ // `.form-control` class can properly style them. Note that this cannot simply
521
+ // be added to `.form-control` as it's not specific enough. For details, see
522
+ // https://github.com/twbs/bootstrap/issues/11586.
523
+
524
+ [type="search"] {
525
+ outline-offset: -2px; // 1
526
+ -webkit-appearance: textfield; // 2
527
+ }
528
+
529
+ // 1. A few input types should stay LTR
530
+ // See https://rtlstyling.com/posts/rtl-styling#form-inputs
531
+ // 2. RTL only output
532
+ // See https://rtlcss.com/learn/usage-guide/control-directives/#raw
533
+
534
+ /* rtl:raw:
535
+ [type="tel"],
536
+ [type="url"],
537
+ [type="email"],
538
+ [type="number"] {
539
+ direction: ltr;
540
+ }
541
+ */
542
+
543
+ // Remove the inner padding in Chrome and Safari on macOS.
544
+
545
+ ::-webkit-search-decoration {
546
+ -webkit-appearance: none;
547
+ }
548
+
549
+ // Remove padding around color pickers in webkit browsers
550
+
551
+ ::-webkit-color-swatch-wrapper {
552
+ padding: 0;
553
+ }
554
+
555
+ // Inherit font family and line height for file input buttons
556
+
557
+ ::file-selector-button {
558
+ font: inherit;
559
+ }
560
+
561
+ // 1. Change font properties to `inherit`
562
+ // 2. Correct the inability to style clickable types in iOS and Safari.
563
+
564
+ ::-webkit-file-upload-button {
565
+ font: inherit; // 1
566
+ -webkit-appearance: button; // 2
567
+ }
568
+
569
+ // Correct element displays
570
+
571
+ output {
572
+ display: inline-block;
573
+ }
574
+
575
+ // Remove border from iframe
576
+
577
+ iframe {
578
+ border: 0;
579
+ }
580
+
581
+ // Summary
582
+ //
583
+ // 1. Add the correct display in all browsers
584
+
585
+ summary {
586
+ display: list-item; // 1
587
+ cursor: pointer;
588
+ }
589
+
590
+ // Progress
591
+ //
592
+ // Add the correct vertical alignment in Chrome, Firefox, and Opera.
593
+
594
+ progress {
595
+ vertical-align: baseline;
596
+ }
597
+
598
+ // Hidden attribute
599
+ //
600
+ // Always hide an element with the `hidden` HTML attribute.
601
+
602
+ [hidden] {
603
+ display: none !important;
604
+ }
@@ -0,0 +1,2 @@
1
+ // Placeholder - no TypeScript code in boot.gl yet
2
+ export {};