Skip to content

Commit

Permalink
chore: update theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mlmoravek committed Nov 10, 2024
1 parent 7a20024 commit 847d422
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 46 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" class="theme-light">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
Expand Down
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import components from "@/components";
main {
flex-grow: 1;
width: 100%;
height: 100vh;
padding: 2rem;
padding-bottom: 6rem;
Expand Down
29 changes: 21 additions & 8 deletions src/assets/scss/components/_datepicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,38 @@ $datepicker-event-background-color: css.getVar("grey-light") !default;
}
}

// unset opacity when dropdow is disabled
.dropdown {
// dropdown override
.dropdown,
&.dropdown {
// unset opacity when dropdow is disabled
&.is-disabled {
opacity: 1;
}
}

.dropdown-item {
font-size: inherit;
.dropdown-menu {
.dropdown-item {
@include css.register-vars(
(
"dropdown-item-background-l-delta": "transparent",
)
);
font-size: inherit;
padding-inline-end: 1rem;
}
}
}

.datepicker-header {
padding-bottom: 0.875rem;
margin-bottom: 0.875rem;
border-bottom: 1px solid css.getVar("grey-lighter");

.pagination-previous,
.pagination-next {
border-width: css.getVar("button-border-width");
.pagination {
button.pagination-previous,
button.pagination-next {
border-width: css.getVar("button-border-width");
border-radius: css.getVar("control-radius");
}
}
}

Expand Down
22 changes: 8 additions & 14 deletions src/assets/scss/components/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@use "bulma/sass/utilities/css-variables" as css;
@use "bulma/sass/utilities/mixins" as mixins;

@use "bulma/sass/components/dropdown" as dropodown;

/* @docs */
$dropdown-mobile-breakpoint: vars.$desktop !default;
$dropdown-background-background-color: hsla(
Expand Down Expand Up @@ -43,6 +45,10 @@ $dropdown-z: 40 !default;
}

.dropdown-item {
@extend a;

cursor: pointer;

&.is-disabled {
cursor: not-allowed;
opacity: css.getVar("dropdown-disabled-opacity");
Expand Down Expand Up @@ -85,6 +91,7 @@ $dropdown-z: 40 !default;
position: static;
display: inline-block;
padding: 0;
overflow: auto;
}

// position classes
Expand Down Expand Up @@ -174,23 +181,10 @@ $dropdown-z: 40 !default;
overflow-y: auto;
z-index: calc(css.getVar("dropdown-z") + 10);

> .dropdown-item,
> .has-link a {
> .dropdown-item {
padding: 1rem 1.5rem;
}
}
}
}

// polyfills for other stuff

.dropdown-menu .has-link a {
@extend .dropdown-item;
padding-right: 3rem;
white-space: nowrap;
}

.navbar-item {
height: 100%;
}
}
10 changes: 10 additions & 0 deletions src/assets/scss/components/_input.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
@use "utils/variables" as var;

.control {
display: inline-block;

&.is-expanded {
width: 100%;
}

> .icon {
@each $name, $value in var.$sizes-map {
&.is-#{$name} {
font-size: #{$value};
}
}
}
}
19 changes: 18 additions & 1 deletion src/assets/scss/components/_menu.scss
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
// nothing todo here
@use "bulma/sass/utilities/css-variables" as css;

.menu {
.menu-item {
&.is-disabled {
// --#{$prefix}menu-item-bg: var(--#{$prefix}menu-item-disabled-bg);
// --#{$prefix}menu-item-color: var(
// --#{$prefix}menu-item-disabled-color
// );

@include css.register-vars(
(
"menu-item-background-l-delta": -10%,
)
);
}
}
}
4 changes: 4 additions & 0 deletions src/assets/scss/components/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
max-height: 100vh;
margin: 0;
}

.modal-content {
width: auto;
}
}
38 changes: 19 additions & 19 deletions src/assets/scss/components/_steps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,32 @@ $steps-vertical-padding: 1em 0 !default;
/* @docs */

.steps-wrapper {
.steps {
@include css.register-vars(
(
"steps-size": #{var.$size-normal},
"steps-divider-height": #{$steps-divider-height},
"steps-details-background-color": #{$steps-details-background-color},
)
);
@include css.register-vars(
(
"steps-size": #{var.$size-normal},
"steps-divider-height": #{$steps-divider-height},
"steps-details-background-color": #{$steps-details-background-color},
)
);

// sizes
@each $name, $value in var.$sizes-map {
&.is-#{$name} {
@include css.register-vars(
(
"steps-size": #{$value},
)
);
}
}

.steps {
display: flex;
flex-wrap: wrap;
font-size: css.getVar("steps-size");
min-height: calc(css.getVar("steps-size") * 2);
list-style: none;

// sizes
@each $name, $value in var.$sizes-map {
&.is-#{$name} {
@include css.register-vars(
(
"steps-size": #{$value},
)
);
}
}

&.is-animated {
.step {
&:not(:first-child),
Expand Down
8 changes: 7 additions & 1 deletion src/assets/scss/components/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ $tabs-toggle-link-focus-border-color: css.getVar(
}
}

.tab-content {
.tabs-content {
position: relative;
overflow: visible;
display: flex;
Expand All @@ -300,6 +300,7 @@ $tabs-toggle-link-focus-border-color: css.getVar(
&.is-fullwidth {
width: 100%;

.tab,
.tab-link {
width: 100%;
}
Expand All @@ -318,9 +319,14 @@ $tabs-toggle-link-focus-border-color: css.getVar(
flex-wrap: wrap;

.tabs {
flex-grow: 0;
flex-direction: column;
border-bottom-color: transparent !important;

.tab-link {
width: 100%;
}

&:not(.is-boxed) {
.tab:not(:has(+ .tab .tab-link.is-active)) .tab-link {
border-bottom-color: css.getVar("tabs-border-bottom-color");
Expand Down
11 changes: 9 additions & 2 deletions src/plugins/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ const bulmaConfig: OrugaOptions = {
override: true,
rootClass: "taginput control",
containerClass: "taginput-container",
itemClass: "tag",
closeClass: "delete is-small",
itemClass: "tag",
variantClass: "is-",
expandedClass: "is-expanded",
},
pagination: {
override: true,
Expand Down Expand Up @@ -264,6 +266,10 @@ const bulmaConfig: OrugaOptions = {
rootClass: "menu",
listClass: "menu-list",
listLabelClass: "menu-label",
itemButtonClass: "menu-item",

Check failure on line 269 in src/plugins/theme.ts

View workflow job for this annotation

GitHub Actions / build

Object literal may only specify known properties, and 'itemButtonClass' does not exist in type 'Partial<{ override: boolean; transformClasses: TransformFunction; }> & Partial<{ itemActiveClass: ClassDefinition; itemDisabledClass: ClassDefinition; ... 12 more ...; animation: string; }>'.
itemButtonActiveClass: "is-active",
itemButtonDisabledClass: "is-disabled",
itemSubmenuClass: "submenu",
},
skeleton: {
override: true,
Expand All @@ -288,7 +294,6 @@ const bulmaConfig: OrugaOptions = {
},
dropdown: {
override: true,
itemTag: "a",
rootClass: "dropdown",
triggerClass: "dropdown-trigger",
menuClass: "dropdown-content dropdown-menu",
Expand Down Expand Up @@ -395,12 +400,14 @@ const bulmaConfig: OrugaOptions = {
reduceClass: "is-mini",
inlineClass: "is-inline",
mobileClass: "is-",
scrollClipClass: "is-clipped",

Check failure on line 403 in src/plugins/theme.ts

View workflow job for this annotation

GitHub Actions / build

Object literal may only specify known properties, but 'scrollClipClass' does not exist in type 'Partial<{ override: boolean; transformClasses: TransformFunction; }> & Partial<{ teleport: string | boolean | Record<string, any>; activeClass: ClassDefinition; ... 29 more ...; scroll: string; }>'. Did you mean to write 'crollClipClass'?
},
loading: {
fullPageClass: "is-full-page",
overlayClass: "loading-overlay",
iconClass: "icon",
rootClass: "loading",
scrollClipClass: "is-clipped",

Check failure on line 410 in src/plugins/theme.ts

View workflow job for this annotation

GitHub Actions / build

Object literal may only specify known properties, and 'scrollClipClass' does not exist in type 'Partial<{ override: boolean; transformClasses: TransformFunction; }> & Partial<{ iconClass: ClassDefinition; labelClass: ClassDefinition; ... 7 more ...; iconSize: string; }>'.
},
carousel: {
override: true,
Expand Down
1 change: 1 addition & 0 deletions stylelint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default {
plugins: ["stylelint-prettier", "stylelint-scss"],
ignoreFiles: ["**/.*", "**/dist"],
rules: {
"scss/operator-no-newline-after": [true, { severity: "warning" }],
"scss/at-extend-no-missing-placeholder": null,
"no-duplicate-selectors": [true, { severity: "warning" }],
"no-descending-specificity": [true, { severity: "warning" }],
Expand Down

0 comments on commit 847d422

Please sign in to comment.