chore: use :deep and :slotted properly

This commit is contained in:
Phan An 2022-10-27 19:06:49 +02:00
parent ab06621a1c
commit d76c9b4e83
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC
12 changed files with 24 additions and 20 deletions

View file

@ -76,7 +76,7 @@ const play = async () => {
.track-listing { .track-listing {
margin-top: 2rem; margin-top: 2rem;
::v-deep(h1) { :deep(h1) {
margin-bottom: 1.2rem; margin-bottom: 1.2rem;
} }
} }

View file

@ -194,7 +194,7 @@ const logout = () => eventBus.emit('LOG_OUT')
} }
} }
::v-deep(button) { :deep(button) {
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;

View file

@ -187,17 +187,17 @@ nav {
flex: 1; flex: 1;
} }
::v-deep(h1) { :deep(h1) {
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 1px; letter-spacing: 1px;
margin-bottom: 12px; margin-bottom: 12px;
} }
::v-deep(a svg) { :deep(a svg) {
opacity: .7; opacity: .7;
} }
::v-deep(a) { :deep(a) {
display: flex; display: flex;
align-items: center; align-items: center;
gap: .7rem; gap: .7rem;
@ -230,7 +230,7 @@ nav {
} }
} }
::v-deep(li li a) { // submenu items :deep(li li a) { // submenu items
padding-left: 11px; padding-left: 11px;
&:active { &:active {

View file

@ -139,7 +139,7 @@ router.onRouteChanged(route => {
cursor: copy; cursor: copy;
} }
::v-deep(a) { :deep(a) {
span { span {
pointer-events: none; pointer-events: none;
} }

View file

@ -12,7 +12,7 @@
width: 560px; width: 560px;
} }
::v-deep(.rules) { :slotted(.rules) {
background: rgba(0, 0, 0, .1); background: rgba(0, 0, 0, .1);
border: 1px solid rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .1);
padding: .75rem; padding: .75rem;

View file

@ -61,7 +61,7 @@ eventBus.on('PLAY_YOUTUBE_VIDEO', (payload: { id: string, title: string }) => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep(#player) { :deep(#player) {
height: 100%; height: 100%;
flex: 1; flex: 1;
display: flex; display: flex;

View file

@ -188,7 +188,7 @@ const createNewPlaylistFromSongs = async () => {
height: 0; height: 0;
border-left: 10px solid transparent; border-left: 10px solid transparent;
border-right: 10px solid transparent; border-right: 10px solid transparent;
border-bottom: 10px solid var(--color-bg-secondary); border-bottom: 10px solid var(--color-bg-primary);
position: absolute; position: absolute;
top: -7px; top: -7px;
left: calc(50% - 10px); left: calc(50% - 10px);

View file

@ -80,7 +80,7 @@ article {
opacity: 1; opacity: 1;
} }
::v-deep(.cover) { :deep(.cover) {
.control { .control {
display: flex; display: flex;
} }
@ -92,7 +92,7 @@ article {
} }
// show the thumbnail's playback control on the whole card focus and hover // show the thumbnail's playback control on the whole card focus and hover
&:hover ::v-deep(.cover), &:focus ::v-deep(.cover) { &:hover :deep(.cover), &:focus :deep(.cover) {
.control { .control {
display: flex; display: flex;
} }

View file

@ -53,11 +53,15 @@ const onContextMenu = (e: MouseEvent) => emit('contextmenu', e)
gap: 0.5rem; gap: 0.5rem;
white-space: nowrap; white-space: nowrap;
::v-deep(a:link) { &:deep(a) {
color: var(--color-text-primary); color: var(--color-text-primary);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
&:deep(a:hover), &:deep(a:active), &:deep(a:focus) {
color: var(--color-accent);
}
} }
&:focus, &:focus-within { &:focus, &:focus-within {
@ -92,7 +96,7 @@ const onContextMenu = (e: MouseEvent) => emit('contextmenu', e)
gap: .3rem; gap: .3rem;
opacity: .7; opacity: .7;
::v-deep(a) { :deep(a) {
& + a { & + a {
&::before { &::before {
content: '•'; content: '•';

View file

@ -13,7 +13,7 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep(.tabs) { :deep(.tabs) {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
@ -21,7 +21,7 @@
color: var(--color-text-secondary); color: var(--color-text-secondary);
} }
::v-deep(header) { :deep(header) {
display: flex; display: flex;
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
overflow: hidden; overflow: hidden;
@ -53,7 +53,7 @@
} }
} }
::v-deep(main) { :deep(main) {
flex: 1; flex: 1;
overflow: auto; overflow: auto;
} }

View file

@ -12,7 +12,7 @@
position: relative; position: relative;
flex-wrap: nowrap; flex-wrap: nowrap;
::v-deep(button) { :deep(button) {
&:not(:first-child) { &:not(:first-child) {
border-radius: 0; border-radius: 0;
} }
@ -30,7 +30,7 @@
} }
} }
&[uppercased] ::v-deep(button) { &[uppercased] :deep(button) {
text-transform: uppercase; text-transform: uppercase;
} }
} }

View file

@ -115,7 +115,7 @@ header.screen-header {
} }
} }
> ::v-deep(* + *) { > :slotted(* + *) {
margin-left: .2rem; margin-left: .2rem;
display: inline-block; display: inline-block;