Skip to content

Commit

Permalink
feat: move styling to es-ds-styles
Browse files Browse the repository at this point in the history
  • Loading branch information
tomleo committed Oct 1, 2024
1 parent 65860cc commit f694df5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
11 changes: 1 addition & 10 deletions es-ds-components/components/es-video.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,9 @@ function handleLoadVideo() {
class="EsVideo-image d-block w-100"
:src="props.coverImageUrl" />
<icon-video-play
class="EsVideo-icon position-absolute center-this"
class="EsVideo-icon position-absolute abs-center"
width="74px"
height="54px" />
</es-card>
</div>
</template>

<style lang="scss" scoped>
.center-this {
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
z-index: 2;
}
</style>
1 change: 1 addition & 0 deletions es-ds-styles/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,7 @@ $form-validation-states: map.merge(
$zindex-dropdown: 1000 !default;
$zindex-sticky: 1020 !default;
$zindex-fixed: 1030 !default;
$zindex-overlay: 1035 !default;
$zindex-modal-backdrop: 1040 !default;
$zindex-modal: 1050 !default;
$zindex-popover: 1060 !default;
Expand Down
8 changes: 8 additions & 0 deletions es-ds-styles/scss/utilities/_position.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@
z-index: variables.$zindex-sticky;
}
}

// Used with position-absolute to center an element within it's container
.abs-center {
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
z-index: variables.$zindex-overlay;
}

0 comments on commit f694df5

Please sign in to comment.