Skip to content

Commit

Permalink
style: Align App UI with the design system (#1672)
Browse files Browse the repository at this point in the history
This PR adds entity label component in entities selector, also includes kebab-case in some nuxt-link

* rename core folder to base

* fix checkbox margin

* remove unused prop

* decorator

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix copy text

* force commit

* update test snapshot

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Closes #1670

(cherry picked from commit 52bbceb)
  • Loading branch information
leiyre authored and frascuchon committed Oct 5, 2022
1 parent 79f0529 commit 67d6de8
Show file tree
Hide file tree
Showing 152 changed files with 2,073 additions and 3,157 deletions.
2 changes: 1 addition & 1 deletion frontend/assets/scss/abstract.scss
Expand Up @@ -16,10 +16,10 @@
*/

// abstract
@import 'abstract/fonts/fonts';
@import 'abstract/functions/functions';
@import 'abstract/variables/variables';
@import 'abstract/mixins/mixins';
@import 'abstract/mixins/media-queries';
@import 'abstract/mixins/grid-mixins';
@import 'abstract/placeholders/placeholders';
@import 'abstract/placeholders/tooltip';
31 changes: 0 additions & 31 deletions frontend/assets/scss/abstract/fonts/fonts.scss

This file was deleted.

6 changes: 3 additions & 3 deletions frontend/assets/scss/abstract/functions/_functions.scss
Expand Up @@ -37,10 +37,10 @@
// http://erskinedesign.com/blog/friendlier-colour-names-sass-maps/

@function palette($palette, $tone: 'base') {
@if map-has-key($palettes-neutral, $palette) {
@return map-get(map-get($palettes-neutral, $palette), $tone);
@if map-has-key($palettes, $palette) {
@return map-get(map-get($palettes, $palette), $tone);
}

@warn "Unknown `#{$palette}` in $palettes-neutral.";
@warn "Unknown `#{$palette}` in $palettes.";
@return null;
}
123 changes: 5 additions & 118 deletions frontend/assets/scss/abstract/placeholders/_placeholders.scss
Expand Up @@ -35,12 +35,12 @@
background: linear-gradient( to bottom, $primary-color 0%, $primary-lighten-color 100%);
}

// Linear gradient using $secondary-color
// Linear gradient using palette(blue, 300)
%secondary-color-gradient {
background: $secondary-color;
background: -moz-linear-gradient( top, $secondary-color 0%, $secondary-darken-color 55%, $secondary-color 100%);
background: -webkit-linear-gradient( top, $secondary-color 0%, $secondary-darken-color 55%, $secondary-color 100%);
background: linear-gradient( to bottom, $secondary-color 0%, $secondary-darken-color 55%, $secondary-color 100%);
background: palette(blue, 300);
background: -moz-linear-gradient( top, palette(blue, 300) 0%, $secondary-darken-color 55%, palette(blue, 300) 100%);
background: -webkit-linear-gradient( top, palette(blue, 300) 0%, $secondary-darken-color 55%, palette(blue, 300) 100%);
background: linear-gradient( to bottom, palette(blue, 300) 0%, $secondary-darken-color 55%, palette(blue, 300) 100%);
}

// Align center block element
Expand Down Expand Up @@ -92,47 +92,6 @@
}
}

// buttons
%button {
position: relative;
min-width: $button-width;
min-height: $button-height;
padding: 0 1.2em 0 1.2em;
display: inline-block;
position: relative;
overflow: hidden;
user-select: none;
cursor: pointer;
outline: 0;
background: none;
border: 0;
border-radius: $button-radius;
font-family: $sff;
@include font-size(13px);
font-style: inherit;
font-variant: inherit;
letter-spacing: inherit;
font-weight: 500;
line-height: $button-height;
text-align: center;
text-decoration: none;
vertical-align: middle;
white-space: nowrap;
margin-bottom: 10px;
transition: all 0.4s $cb-fast;
&:focus {
outline: 0;
}
&::-moz-focus-inner {
border: 0;
}
&[disabled] {
opacity: 0.5;
cursor: default;
pointer-events: none;
}
}

%clear {
@include font-size(13px);
background: none;
Expand All @@ -149,78 +108,6 @@
background: none;
}
}

// tooltip
%tooltip {
box-shadow: $shadow-100;
padding: 0.2em;
color: $font-dark-color;
background: $lighter-color;
font-family: $ff;
@include font-size(13px);
border: 1px solid $line-light-color;
position: absolute;
margin: auto;
transform: translateX(50%);
max-width: 266px;
overflow-wrap: break-word;
pointer-events: none;
z-index: 2;
white-space: nowrap;
}
%tooltip--top {
&:after {
top: -35px;
right: 50%;
left: auto;
}
}
%tooltip--left {
&:after {
right: calc(100% + 5px);
top: auto;
transform: none !important;
}
}
%activetooltip {
&:after {
content: attr(data-title);
@extend %tooltip;
}
}
%hastooltip {
&:after {
content: attr(data-title);
@extend %tooltip;
opacity: 0;
z-index: -1;
width: 0;
height: 0;
overflow: hidden;
}
&:before {
content: "";
position: absolute;
display: block;
width: 0;
height: 0;
opacity: 0;
pointer-events: none;
}
&:hover{
&:after {
width: auto;
height: auto;
opacity: 1;
transition: opacity 0.1s ease 0.2s;
z-index: 2;
}
&:before {
opacity: 1;
transition: opacity 0.1s ease 0.2s;
}
}
}
%hide-scrollbar {
/* Hide scrollbar for IE, Edge and Firefox */
-ms-overflow-style: none; /* IE and Edge */
Expand Down
105 changes: 105 additions & 0 deletions frontend/assets/scss/abstract/placeholders/_tooltip.scss
@@ -0,0 +1,105 @@
// tooltip
$tooltip-bg: palette(grey, 100);
$tooltip-color: palette(white);
$tooltip-font-size: 14px;
$tooltip-triangle-size: 7px;
$tooltip-border-radius: $border-radius-s;

%tooltip {
position: absolute;
margin: auto;
max-width: 266px;
overflow-wrap: break-word;
pointer-events: none;
z-index: 2;
white-space: nowrap;
padding: $base-space $base-space*2;
transform: none;
background: $tooltip-bg;
color: $tooltip-color;
border-radius: $tooltip-border-radius;
@include font-size($tooltip-font-size);
font-family: $ff;
font-weight: 600;
}
%has-tooltip--left {
@extend %has-tooltip;
&:after {
top: 50%;
transform: translateY(-50%);
right: calc(100% + 10px);
}
&:before {
right: calc(100% + $tooltip-triangle-size/2);
top: 50%;
transform: translateY(-50%);
@include triangle(right, $tooltip-triangle-size, $tooltip-triangle-size, $tooltip-bg);
}
}
%has-tooltip--bottom {
@extend %has-tooltip;
&:after {
top: calc(100% + 20px);
right: 50%;
transform: translateX(50%);
}
&:before {
right: calc(50% - $tooltip-triangle-size/2);
top: $tooltip-triangle-size*2;
@include triangle(top, $tooltip-triangle-size, $tooltip-triangle-size, $tooltip-bg);
}
}
%has-tooltip--top {
@extend %has-tooltip;
&:after {
bottom: calc(100% + 10px);
right: 50%;
transform: translateX(50%);
}
&:before {
right: calc(50% - $tooltip-triangle-size);
top: -10px;
@include triangle(bottom, $tooltip-triangle-size, $tooltip-triangle-size, $tooltip-bg);
}
}
%tooltip-large-text {
&:after {
min-width: 216px;
white-space: break-spaces;
text-align: left;
line-height: 1.4em;
}
}
%has-tooltip {
&:after {
content: attr(data-title);
@extend %tooltip;
opacity: 0;
z-index: -1;
width: 0;
height: 0;
overflow: hidden;
}
&:before {
content: "";
position: absolute;
display: block;
width: 0;
height: 0;
opacity: 0;
pointer-events: none;
}
&:hover{
&:after {
width: auto;
height: auto;
opacity: 1;
transition: opacity 0.1s ease 0.2s;
z-index: 2;
}
&:before {
opacity: 1;
transition: opacity 0.1s ease 0.2s;
}
}
}

0 comments on commit 67d6de8

Please sign in to comment.