Skip to content

Commit

Permalink
Merge pull request #335 from fmkra/fix/css-bundle-size
Browse files Browse the repository at this point in the history
Reduce CSS bundle
  • Loading branch information
fmkra authored Mar 13, 2024
2 parents 16230de + d81aea6 commit 5414a6c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
7 changes: 5 additions & 2 deletions oioioi/contests/static/common/contests.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import "scss/utility";
@import "scss/style";

$list-grid-column-min-width: 70px !default;
$list-grid-column-count: 5 !default;
Expand Down Expand Up @@ -30,7 +29,11 @@ $list-subheader-bgcolor: #eee !default;

.form-list-unstyled {
ul {
@extend .list-unstyled;
// Should be @extend .list-unstyled
// but it requires whole scss/style
// which increases bundle size dramatically
padding-left: 0;
list-style: none;
}
}

Expand Down
17 changes: 14 additions & 3 deletions oioioi/programs/static/common/programs.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
@import "scss/style";
@import "bootstrap/stylesheets/_functions";
@import "bootstrap/stylesheets/_variables";
@import "bootstrap/stylesheets/mixins/_breakpoints";
@import "bootstrap/stylesheets/mixins/_border-radius";
@import "bootstrap/stylesheets/mixins/_hover";
@import "bootstrap/stylesheets/_card";

.test-actions {
visibility: hidden;
Expand Down Expand Up @@ -70,7 +75,10 @@

.linenodiv, .syntax-highlight {
@extend .card;
@extend .bg-light;
// Should be @extend .bg-light
// but it requires whole bootstrap to be included
// which increases bundle size dramatically
background-color: #f8f9fa !important;
padding: ($spacer * 0.5);
}
}
Expand All @@ -82,7 +90,10 @@

&.line-numbers, &.code {
@extend .card;
@extend .bg-light;
// Should be @extend .bg-light
// but it requires whole bootstrap to be included
// which increases bundle size dramatically
background-color: #f8f9fa !important;
padding: ($spacer * 0.5);
}
}
2 changes: 0 additions & 2 deletions oioioi/programs/static/common/submission-diff.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import "scss/style";

$left-diff-text: #b94a48 !default;
$left-diff-background: #f2dede !default;
$right-diff-text: #468847 !default;
Expand Down

0 comments on commit 5414a6c

Please sign in to comment.