Directly include CSS from bootstrap and codemirror packages

This commit is contained in:
Henrik Giesel 2021-08-17 21:25:38 +02:00
parent e5409a25b5
commit 4a2d2a75c1
6 changed files with 15 additions and 13 deletions

View File

@ -14,7 +14,10 @@ def compile_sass(group, srcs, deps = [], visibility = ["//visibility:private"]):
sourcemap = False,
deps = deps,
visibility = visibility,
include_paths = ["external/ankidesktop"],
include_paths = [
"ts/sass",
"external/ankidesktop/ts/sass",
],
)
native.filegroup(

View File

@ -1,5 +1,5 @@
@use 'ts/sass/base';
@use 'ts/sass/scrollbar';
@use 'base';
@use 'scrollbar';
.night-mode {
@include scrollbar.night-mode;

View File

@ -19,8 +19,8 @@ $utilities: (
),
);
@import "ts/sass/bootstrap/bootstrap-reboot";
@import "ts/sass/bootstrap/bootstrap-utilities";
@import "bootstrap/scss/bootstrap-reboot";
@import "bootstrap/scss/bootstrap-utilities";
/* Bootstrap "extensions" */
.flex-basis-100 {

View File

@ -9,7 +9,6 @@ vendor_js_lib(
],
base = "external/npm/node_modules/bootstrap/",
pkg = pkg_from_name("bootstrap"),
strip_prefix = "scss/",
visibility = ["//visibility:private"],
)

View File

@ -1,5 +1,5 @@
@import "ts/sass/bootstrap/functions";
@import "ts/sass/bootstrap/variables";
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@mixin btn-border-radius {
border-top-left-radius: var(--border-left-radius);

View File

@ -153,13 +153,13 @@ async function writeJs(
const preprocessOptions = preprocess({
scss: {
includePaths: [
binDir,
genDir,
`${binDir}/ts/sass`,
`${genDir}/ts/sass`,
// a nasty hack to ensure ts/sass/... resolves correctly
// when invoked from an external workspace
binDir + "/external/ankidesktop",
genDir + "/external/ankidesktop",
binDir + "/../../../external/ankidesktop",
`${binDir}/external/ankidesktop/ts/sass`,
`${genDir}/external/ankidesktop/ts/sass`,
`${binDir}/../../../external/ankidesktop/ts/sass`,
],
},
});