-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathstylesheets.scss
83 lines (66 loc) · 3.16 KB
/
stylesheets.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
/* eslint no-console:0 */
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
//
// To reference this file, add <%= stylesheet_pack_tag 'stylesheets' %> to the appropriate
// layout file, like app/views/layouts/application.html.slim
$web-font-path: '//';
@import 'bootswatch/dist/yeti/variables';
@import 'bootstrap/scss/bootstrap';
@import 'bootswatch/dist/yeti/bootswatch';
// Import the Ace editor styles
@import url('ace-builds/css/ace.css');
@import url('ace-builds/css/theme/tomorrow.css');
@import url('ace-builds/css/theme/tomorrow_night.css');
// We define our own button style here, since `btn-outline-dark` and `btn-outline-light` do not switch colors.
html[data-bs-theme="dark"] {
.btn-outline-contrast {
@extend .btn-outline-light;
}
.bg-contrast {
@extend .bg-light;
}
}
html[data-bs-theme="light"] {
.btn-outline-contrast {
@extend .btn-outline-dark;
}
.bg-contrast {
@extend .bg-dark;
}
}
$fa-font-path: '@fortawesome/fontawesome-free/webfonts/';
@import '@fortawesome/fontawesome-free/scss/fontawesome';
@import '@fortawesome/fontawesome-free/scss/solid';
@import '@fortawesome/fontawesome-free/scss/regular';
@import '@fortawesome/fontawesome-free/scss/v4-shims';
$opensans-path: 'opensans-webkit/fonts/';
// Import the Open Sans font. We need to override the font-display property
// to swap, otherwise the font will block rendering. This is done manually.
// as no variable is included yet.
// We inline the `opensans-webkit/src/sass/open-sans.scss`
@import 'opensans-webkit/src/sass/variables';
@mixin opensans-font($path, $name, $style, $weight, $variant) {
@font-face {
font-display: swap; // Manually added
font-family: '#{$name}';
font-style: $style;
font-weight: $weight;
src: local('Open Sans #{$variant}'),
local('Open-Sans-#{$variant}'),
url('#{$path}OpenSans-#{$variant}.woff2') format('woff2'),
url('#{$path}OpenSans-#{$variant}.woff') format('woff');
}
}
@include opensans-font($opensans-path, $opensans-name, normal, $opensans-weight-extrabold, 'ExtraBold');
@include opensans-font($opensans-path, $opensans-name, italic, $opensans-weight-extrabold, 'ExtraBoldItalic');
@include opensans-font($opensans-path, $opensans-name, normal, $opensans-weight-bold, 'Bold');
@include opensans-font($opensans-path, $opensans-name, italic, $opensans-weight-bold, 'BoldItalic');
@include opensans-font($opensans-path, $opensans-name, normal, $opensans-weight-semibold, 'SemiBold');
@include opensans-font($opensans-path, $opensans-name, italic, $opensans-weight-semibold, 'SemiBoldItalic');
@include opensans-font($opensans-path, $opensans-name, normal, $opensans-weight-normal, 'Regular');
@include opensans-font($opensans-path, $opensans-name, italic, $opensans-weight-normal, 'Italic');
@include opensans-font($opensans-path, $opensans-name, normal, $opensans-weight-light, 'Light');
@include opensans-font($opensans-path, $opensans-name, italic, $opensans-weight-light, 'LightItalic');