Skip to content

Commit

Permalink
style: Improve code structure
Browse files Browse the repository at this point in the history
  • Loading branch information
NriotHrreion committed May 12, 2024
1 parent 861c9c2 commit 97eb5c6
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 42 deletions.
20 changes: 20 additions & 0 deletions src/style/calculator/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@
}
}

.scrollbar-style() {
@size: 7px;
&::-webkit-scrollbar {
width: @size;
height: @size;
}
&::-webkit-scrollbar-thumb {
background-color: var(--ca-gray8);
&:hover {
background-color: var(--ca-gray7);
}
&:active {
background-color: var(--ca-gray6);
}
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
}

.function-tag() {
display: flex;
align-items: center;
Expand Down
1 change: 1 addition & 0 deletions src/style/layout.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import "./fonts.less";
@import "./vars.less";
@import "./theme.less";
@import "./animation.less";

@import "./dialog.less";
Expand Down
23 changes: 23 additions & 0 deletions src/style/theme.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
body[theme=light] {
kbd {
background-color: #dad8d8;
border-color: var(--ca-gray1);
}

.select {
.select-button button, .select-panel {
background-color: var(--ca-light2);
}
.select-panel-wrapper {
box-shadow: 0 0 5px 0 #636262, 0 5px 15px #7e7e7e;
}
}

#dialogs dialog {
box-shadow: 0 0 11px 0px #636262, 0 16px 15px #7e7e7e;
}

.calculator-container .output-container .number-box-list .number-box.active * {
color: #3b3c3c !important;
}
}
42 changes: 0 additions & 42 deletions src/style/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -53,50 +53,8 @@
--ca-tag-const: #4d7ed8;
--ca-tag-func: #8250df;
--ca-selection: #afd2f3;

kbd {
background-color: #dad8d8;
border-color: var(--ca-gray1);
}

.select {
.select-button button, .select-panel {
background-color: var(--ca-light2);
}
.select-panel-wrapper {
box-shadow: 0 0 5px 0 #636262, 0 5px 15px #7e7e7e;
}
}

#dialogs dialog {
box-shadow: 0 0 11px 0px #636262, 0 16px 15px #7e7e7e;
}

.calculator-container .output-container .number-box-list .number-box.active * {
color: #3b3c3c !important;
}
}

--ca-seniority-split: "";
--ca-atom-split: "+";
}

.scrollbar-style() {
@size: 7px;
&::-webkit-scrollbar {
width: @size;
height: @size;
}
&::-webkit-scrollbar-thumb {
background-color: var(--ca-gray8);
&:hover {
background-color: var(--ca-gray7);
}
&:active {
background-color: var(--ca-gray6);
}
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
}

0 comments on commit 97eb5c6

Please sign in to comment.