1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

style: 🎨 stylelint implementation

This commit is contained in:
2020-07-31 18:16:28 +02:00
parent 70908eb076
commit 092e8a0732
36 changed files with 2261 additions and 753 deletions

14
.stylelintrc Normal file
View File

@ -0,0 +1,14 @@
{
"extends": [
"stylelint-config-standard"
],
"fix": true,
"formatter": "verbose",
"plugins": [
"stylelint-scss"
],
"rules": {
"at-rule-no-unknown": null
},
"syntax": "scss"
}

1486
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -64,6 +64,9 @@
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"sass-loader": "^9.0.2", "sass-loader": "^9.0.2",
"stylelint": "^13.6.1",
"stylelint-config-standard": "^20.0.0",
"stylelint-scss": "^3.18.0",
"vue": "^2.6.11", "vue": "^2.6.11",
"webpack": "^4.44.1" "webpack": "^4.44.1"
} }

View File

@ -25,7 +25,8 @@ async function createMainWindow () {
webPreferences: { webPreferences: {
nodeIntegration: true, nodeIntegration: true,
'web-security': false, 'web-security': false,
enableRemoteModule: true enableRemoteModule: true,
spellcheck: false
}, },
frame: false, frame: false,
backgroundColor: '#1d1d1d' backgroundColor: '#1d1d1d'

View File

@ -40,7 +40,6 @@ export default {
<style lang="scss"> <style lang="scss">
.context { .context {
display: flex; display: flex;
position: absolute;
color: $body-font-color; color: $body-font-color;
font-size: 16px; font-size: 16px;
z-index: 400; z-index: 400;
@ -59,7 +58,7 @@ export default {
min-width: 100px; min-width: 100px;
max-width: 150px; max-width: 150px;
z-index: 1; z-index: 1;
box-shadow: 0px 0px 1px 0px #000; box-shadow: 0 0 1px 0 #000;
padding: 0; padding: 0;
background: #1d1d1d; background: #1d1d1d;
border-radius: 0.1rem; border-radius: 0.1rem;
@ -71,7 +70,7 @@ export default {
.context-element { .context-element {
display: flex; display: flex;
align-items: center; align-items: center;
padding: .1rem .3rem; padding: 0.1rem 0.3rem;
cursor: pointer; cursor: pointer;
&:hover { &:hover {

View File

@ -71,7 +71,3 @@ export default {
} }
}; };
</script> </script>
<style>
</style>

View File

@ -200,6 +200,5 @@ export default {
align-items: center; align-items: center;
} }
} }
} }
</style> </style>

View File

@ -70,7 +70,7 @@ export default {
<style lang="scss"> <style lang="scss">
.editor-wrapper { .editor-wrapper {
border-bottom: 1px solid #444444; border-bottom: 1px solid #444;
} }
.CodeMirror { .CodeMirror {
@ -83,7 +83,6 @@ export default {
.CodeMirror-line { .CodeMirror-line {
word-break: break-word !important; word-break: break-word !important;
white-space: pre-wrap !important; white-space: pre-wrap !important;
word-break: normal;
} }
} }
</style> </style>

View File

@ -69,7 +69,3 @@ export default {
} }
}; };
</script> </script>
<style>
</style>

View File

@ -56,12 +56,12 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background: $primary-color; background: $primary-color;
padding: 0 .2rem; padding: 0 0.2rem;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
box-shadow: 0 0 1px 0px #000; box-shadow: 0 0 1px 0 #000;
.footer-elements { .footer-elements {
list-style: none; list-style: none;
@ -73,15 +73,15 @@ export default {
height: $footer-height; height: $footer-height;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 .4rem; padding: 0 0.4rem;
margin: 0; margin: 0;
&.footer-link { &.footer-link {
cursor: pointer; cursor: pointer;
transition: background .2s; transition: background 0.2s;
&:hover { &:hover {
background: rgba($color: #fff, $alpha: .1); background: rgba($color: #fff, $alpha: 0.1);
} }
} }
} }

View File

@ -115,7 +115,7 @@ export default {
align-items: center; align-items: center;
background: $bg-color-light; background: $bg-color-light;
padding: 0; padding: 0;
box-shadow: 0 0 1px 0px #000; box-shadow: 0 0 1px 0 #000;
z-index: 9; z-index: 9;
.settingbar-top-elements { .settingbar-top-elements {
@ -129,7 +129,7 @@ export default {
} }
.settingbar-bottom-elements { .settingbar-bottom-elements {
padding-top: .5rem; padding-top: 0.5rem;
background: $bg-color-light; background: $bg-color-light;
z-index: 1; z-index: 1;
} }
@ -146,8 +146,8 @@ export default {
width: 100%; width: 100%;
margin: 0; margin: 0;
border-left: 3px solid transparent; border-left: 3px solid transparent;
opacity: .5; opacity: 0.5;
transition: opacity .2s; transition: opacity 0.2s;
display: flex; display: flex;
align-content: center; align-content: center;
justify-content: center; justify-content: center;
@ -163,7 +163,6 @@ export default {
} }
.settingbar-element-icon { .settingbar-element-icon {
&.badge::after { &.badge::after {
bottom: -10px; bottom: -10px;
right: 0; right: 0;
@ -172,7 +171,6 @@ export default {
} }
} }
} }
} }
} }
@ -183,19 +181,18 @@ export default {
opacity: 0; opacity: 0;
display: block; display: block;
position: absolute; position: absolute;
background-color:#feffe1;
text-align: center; text-align: center;
margin:.0 0 0 calc(#{$settingbar-width} - 5px); margin: 0 0 0 calc(#{$settingbar-width} - 5px);
left: 0; left: 0;
padding: .2rem .4rem; padding: 0.2rem 0.4rem;
font-size: .7rem; font-size: 0.7rem;
background: rgba(48,55,66,.95); background: rgba(48, 55, 66, 0.95);
border-radius: .1rem; border-radius: 0.1rem;
color: #fff; color: #fff;
max-width: 320px; max-width: 320px;
pointer-events: none; pointer-events: none;
text-overflow: ellipsis; text-overflow: ellipsis;
transition: opacity .2s; transition: opacity 0.2s;
} }
&:hover .ex-tooltip-content { &:hover .ex-tooltip-content {

View File

@ -90,7 +90,7 @@ export default {
height: $titlebar-height; height: $titlebar-height;
-webkit-app-region: drag; -webkit-app-region: drag;
user-select: none; user-select: none;
box-shadow: 0 0 1px 0px #000; box-shadow: 0 0 1px 0 #000;
z-index: 9999; z-index: 9999;
.titlebar-resizer { .titlebar-resizer {
@ -108,7 +108,7 @@ export default {
.titlebar-logo { .titlebar-logo {
height: $titlebar-height; height: $titlebar-height;
padding: 0 .4rem; padding: 0 0.4rem;
} }
.titlebar-element { .titlebar-element {
@ -116,14 +116,14 @@ export default {
align-items: center; align-items: center;
height: $titlebar-height; height: $titlebar-height;
line-height: 0; line-height: 0;
padding: 0 .7rem; padding: 0 0.7rem;
opacity: .7; opacity: 0.7;
transition: opacity .2s; transition: opacity 0.2s;
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
&:hover { &:hover {
opacity: 1; opacity: 1;
background: rgba($color: #fff, $alpha: .2); background: rgba($color: #fff, $alpha: 0.2);
} }
&.close-button:hover { &.close-button:hover {

View File

@ -114,13 +114,13 @@ export default {
} }
> a { > a {
padding: .2rem .8rem; padding: 0.2rem 0.8rem;
color: $body-font-color; color: $body-font-color;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
align-items: center; align-items: center;
opacity: .7; opacity: 0.7;
transition: opacity .2s; transition: opacity 0.2s;
&:hover { &:hover {
opacity: 1; opacity: 1;
@ -154,10 +154,10 @@ export default {
border-color: $bg-color-light; border-color: $bg-color-light;
padding: 0; padding: 0;
font-weight: 700; font-weight: 700;
font-size: .7rem; font-size: 0.7rem;
> div { > div {
padding: .1rem .4rem; padding: 0.1rem 0.4rem;
min-width: -webkit-fill-available; min-width: -webkit-fill-available;
} }
} }
@ -166,16 +166,16 @@ export default {
border-right: 1px solid; border-right: 1px solid;
border-bottom: 1px solid; border-bottom: 1px solid;
border-color: $bg-color-light; border-color: $bg-color-light;
padding: 0 .4rem; padding: 0 0.4rem;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 200px; max-width: 200px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
font-size: .7rem; font-size: 0.7rem;
&:focus { &:focus {
box-shadow:inset 0px 0px 0px 1px $body-font-color; box-shadow: inset 0 0 0 1px $body-font-color;
background: rgba($color: #000000, $alpha: .3); background: rgba($color: #000, $alpha: 0.3);
outline: none; outline: none;
} }
} }

View File

@ -141,7 +141,7 @@ export default {
align-items: center; align-items: center;
text-align: left; text-align: left;
background: $bg-color-gray; background: $bg-color-gray;
box-shadow: 0 0 1px 0px #000; box-shadow: 0 0 1px 0 #000;
z-index: 8; z-index: 8;
flex: initial; flex: initial;
position: relative; position: relative;
@ -149,10 +149,10 @@ export default {
.workspace-explorebar-header { .workspace-explorebar-header {
width: 100%; width: 100%;
padding: .3rem; padding: 0.3rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: .6rem; font-size: 0.6rem;
font-weight: 700; font-weight: 700;
text-transform: uppercase; text-transform: uppercase;
@ -170,8 +170,8 @@ export default {
align-items: center; align-items: center;
> i { > i {
opacity: .6; opacity: 0.6;
transition: opacity .2s; transition: opacity 0.2s;
display: flex; display: flex;
align-items: center; align-items: center;
@ -186,7 +186,7 @@ export default {
width: 100%; width: 100%;
height: calc((100vh - 30px) - #{$excluding-size}); height: calc((100vh - 30px) - #{$excluding-size});
overflow: overlay; overflow: overlay;
padding: 0 .1rem; padding: 0 0.1rem;
} }
} }
</style> </style>

View File

@ -61,9 +61,9 @@ export default {
a.table-name { a.table-name {
display: flex; display: flex;
align-items: center; align-items: center;
padding: .1rem; padding: 0.1rem;
cursor: pointer; cursor: pointer;
font-size: .7rem; font-size: 0.7rem;
> span { > span {
overflow: hidden; overflow: hidden;
@ -74,7 +74,7 @@ export default {
&:hover { &:hover {
color: $body-font-color; color: $body-font-color;
background: rgba($color: #FFF, $alpha: .05); background: rgba($color: #fff, $alpha: 0.05);
border-radius: 2px; border-radius: 2px;
} }
} }

View File

@ -153,11 +153,10 @@ export default {
align-content: baseline; align-content: baseline;
.workspace-query-runner { .workspace-query-runner {
.workspace-query-runner-footer { .workspace-query-runner-footer {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: .3rem .6rem .4rem; padding: 0.3rem 0.6rem 0.4rem;
align-items: center; align-items: center;
.workspace-query-buttons { .workspace-query-buttons {
@ -167,7 +166,7 @@ export default {
display: flex; display: flex;
align-self: center; align-self: center;
color: $body-font-color; color: $body-font-color;
margin-right: .4rem; margin-right: 0.4rem;
} }
} }
@ -175,7 +174,7 @@ export default {
display: flex; display: flex;
> div + div { > div + div {
padding-left: .6rem; padding-left: 0.6rem;
} }
} }
} }

View File

@ -288,16 +288,16 @@ export default {
} }
.sort-icon { .sort-icon {
font-size: .7rem; font-size: 0.7rem;
line-height: 1; line-height: 1;
margin-left: .2rem; margin-left: 0.2rem;
} }
.column-key { .column-key {
transform: rotate(90deg); transform: rotate(90deg);
font-size: .7rem; font-size: 0.7rem;
line-height: 1.5; line-height: 1.5;
margin-right: .2rem; margin-right: 0.2rem;
&.key-pri { &.key-pri {
color: goldenrod; color: goldenrod;

View File

@ -214,7 +214,7 @@ export default {
.cell-content { .cell-content {
display: block; display: block;
min-height: .8rem; min-height: 0.8rem;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@ -225,7 +225,7 @@ export default {
} }
.editor-field-info { .editor-field-info {
margin-top: .6rem; margin-top: 0.6rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }

View File

@ -67,7 +67,3 @@ export default {
} }
}; };
</script> </script>
<style>
</style>

View File

@ -150,11 +150,10 @@ export default {
align-content: baseline; align-content: baseline;
.workspace-query-runner { .workspace-query-runner {
.workspace-query-runner-footer { .workspace-query-runner-footer {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: .3rem .6rem .4rem; padding: 0.3rem 0.6rem 0.4rem;
align-items: center; align-items: center;
.workspace-query-buttons { .workspace-query-buttons {
@ -164,7 +163,7 @@ export default {
display: flex; display: flex;
align-self: center; align-self: center;
color: $body-font-color; color: $body-font-color;
margin-right: .4rem; margin-right: 0.4rem;
} }
} }
@ -172,7 +171,7 @@ export default {
display: flex; display: flex;
> div + div { > div + div {
padding-left: .6rem; padding-left: 0.6rem;
} }
} }
} }

View File

@ -5,12 +5,35 @@
display: table; display: table;
table-layout: fixed; table-layout: fixed;
&.table-striped {
.tbody { .tbody {
.tr:nth-of-type(odd) { display: table-row-group;
background: $bg-color;
} }
.tr {
display: table-row;
} }
// Scollable tables
&.table-scroll {
display: block;
overflow-x: auto;
padding-bottom: 0.75rem;
white-space: nowrap;
}
.thead {
display: table-header-group;
}
.td,
.th {
border-bottom: $border-width solid $border-color;
padding: $unit-3 $unit-2;
display: table-cell;
}
.th {
border-bottom-width: $border-width-lg;
} }
&, &,
@ -20,6 +43,7 @@
&.selected { &.selected {
background: #333 !important; background: #333 !important;
} }
&.active { &.active {
background: $bg-color-dark; background: $bg-color-dark;
} }
@ -37,33 +61,11 @@
} }
} }
// Scollable tables &.table-striped {
&.table-scroll {
display: block;
overflow-x: auto;
padding-bottom: 0.75rem;
white-space: nowrap;
}
.thead {
display: table-header-group;
}
.tbody { .tbody {
display: table-row-group; .tr:nth-of-type(odd) {
} background: $bg-color;
}
.tr { }
display: table-row;
}
.td,
.th {
border-bottom: $border-width solid $border-color;
padding: $unit-3 $unit-2;
display: table-cell;
}
.th {
border-bottom-width: $border-width-lg;
} }
} }

View File

@ -1,16 +1,38 @@
.material-icons {
// TODO: rewrite with rem
.material-icons{// TODO: rewrite with rem
/* Rules for sizing the icon. */ /* Rules for sizing the icon. */
&.md-18 { font-size: 18px; } &.md-18 {
&.md-24 { font-size: 24px; } font-size: 18px;
&.md-36 { font-size: 36px; } }
&.md-48 { font-size: 48px; }
&.md-24 {
font-size: 24px;
}
&.md-36 {
font-size: 36px;
}
&.md-48 {
font-size: 48px;
}
/* Rules for using icons as black on a light background. */ /* Rules for using icons as black on a light background. */
&.md-dark { color: rgba(0, 0, 0, 0.54); } &.md-dark {
&.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); } color: rgba(0, 0, 0, 0.54);
}
&.md-dark.md-inactive {
color: rgba(0, 0, 0, 0.26);
}
/* Rules for using icons as white on a dark background. */ /* Rules for using icons as white on a dark background. */
&.md-light { color: rgba(255, 255, 255, 1); } &.md-light {
&.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); } color: rgba(255, 255, 255, 1);
}
&.md-light.md-inactive {
color: rgba(255, 255, 255, 0.3);
}
} }

View File

@ -1,9 +1,11 @@
.slide-fade-enter-active { .slide-fade-enter-active {
transition: all 0.3s ease; transition: all 0.3s ease;
} }
.slide-fade-leave-active { .slide-fade-leave-active {
transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1); transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
} }
.slide-fade-enter, .slide-fade-enter,
.slide-fade-leave-to { .slide-fade-leave-to {
transform: translateX(10px); transform: translateX(10px);

View File

@ -59,6 +59,7 @@ body {
from { from {
transform: rotate(0deg); transform: rotate(0deg);
} }
to { to {
transform: rotate(359deg); transform: rotate(359deg);
} }
@ -75,9 +76,9 @@ body {
background: rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.15);
} }
.modal-sm .modal-container, .modal-container,
.modal-container { .modal-sm .modal-container {
box-shadow: 0 0 1px 0px #000; box-shadow: 0 0 1px 0 #000;
padding: 0; padding: 0;
background: $bg-color; background: $bg-color;
@ -133,6 +134,7 @@ body {
.menu { .menu {
font-size: 0.7rem; font-size: 0.7rem;
.menu-item { .menu-item {
+ .menu-item { + .menu-item {
margin-top: 0; margin-top: 0;