Skip to content

Commit

Permalink
update label
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchox5 committed Oct 3, 2023
1 parent d99d113 commit f540277
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion assets/css/index.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/index.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/zumer.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/zumer.min.css.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions examples/generic.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
<div class="orbiter m">
</div>
<div class="orbiter m">
<div class="label pos-45">
<div class="text">Tactic sat intel <br> trino</div>
</div>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/components/__base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@import './orbiter';
@import './label';
@import './modal';
@import './popover';
@import './progress';
@import './sector';
@import './core';
Expand Down
1 change: 0 additions & 1 deletion src/components/__style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@import './orbiter-style';
@import './label-style';
@import './modal-style';
@import './popover-style';
@import './progress-style';
@import './sector-style';
@import './core-style';
Expand Down
13 changes: 6 additions & 7 deletions src/components/_label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/* Set size variable for each orbiter */
@each $size, $var in $sizes {
.label#{$size} {
.orbiter#{$size} > .label {
@if $size != null {
--size: #{$var};
}
Expand All @@ -31,7 +31,6 @@
/* Set size variable for each orbiter */
@each $pos, $angle in $position {
.label#{$pos} {

--label-angle: calc(#{$angle} * 1deg);
}

Expand All @@ -42,8 +41,9 @@
display: grid;
border: 1px solid;
border-radius: 4px;
width: var(--label-width);
height: 20px;
min-width: 100px;
padding: 5px;
height:auto;
@include alignment;
}

Expand All @@ -54,14 +54,13 @@

.label > .text {
transform: translate(calc(var(--connector-width) - 5px), var(--label-box))
rotate(var(--label-angle-invert));
rotate(calc(var(--label-angle) * -1));
}

@each $pos, $angle in $position {
.label#{$pos} > .text {
--label-angle-invert: calc(var(--label-angle) * -1deg);
@if $pos != '.pos-180' {
--label-box: +5px;
--label-box: 5px;
} @else {
--label-box: -5px;
}
Expand Down
2 changes: 0 additions & 2 deletions src/components/_popover-style.scss

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/_popover.scss

This file was deleted.

0 comments on commit f540277

Please sign in to comment.