Skip to content

Commit

Permalink
feat: improve element placement issues and get rid of flip-x
Browse files Browse the repository at this point in the history
  • Loading branch information
murilo-cunha authored and tboerger committed Jul 20, 2023
1 parent f555e61 commit 69c90f2
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 21 deletions.
2 changes: 1 addition & 1 deletion layouts/center.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="slidev-layout text-center">
<LayoutHeader class="absolute bottom-0 right-0 transform flip-x" />
<LayoutHeader class="absolute bottom-0 right-0 transform rotate-y-180" />
<div class="my-auto">
<slot />
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/cover.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="slidev-layout cover text-center">
<LayoutHeader class="absolute bottom-0 right-0 transform flip-x" />
<LayoutHeader class="absolute bottom-0 right-0 transform rotate-y-180" />
<div class="my-auto">
<slot />
</div>
Expand Down
4 changes: 2 additions & 2 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const props = defineProps({

<template>
<div class="slidev-layout default col-grid">
<LayoutHeader class="absolute bottom-0 right-0 transform rotate-y-180" />
<div
class="top"
:class="props.class"
>
<LayoutHeader class="absolute bottom-0 right-0 transform flip-x" />
<slot />
</div>
<div
Expand All @@ -33,8 +33,8 @@ const props = defineProps({
:class="props.class"
>
<slot name="bottom" />
<LayoutFooter />
</div>
<LayoutFooter />
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion layouts/presenter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<template>
<div class="slidev-layout presenter">
<LayoutHeader class="absolute bottom-0 right-0 transform flip-x" />
<LayoutHeader class="absolute bottom-0 right-0 transform rotate-y-180" />
<div class="grid grid-cols-2 w-full h-full">
<div class="image-right">
<slot />
Expand Down
2 changes: 1 addition & 1 deletion layouts/qrcode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const qrcode = computed(() => {

<template>
<div class="slidev-layout qrcode text-center">
<LayoutHeader class="absolute bottom-0 right-0 transform flip-x" />
<LayoutHeader class="absolute bottom-0 right-0 transform rotate-y-180" />
<slot />
<div class="container mx-auto">
<img
Expand Down
4 changes: 2 additions & 2 deletions layouts/twocols.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const props = defineProps({

<template>
<div class="slidev-layout default">
<LayoutHeader class="absolute bottom-0 right-0 transform flip-x" />
<LayoutHeader class="absolute bottom-0 right-0 transform rotate-y-180" />
<slot />
<div class="flex mt-6 mb-3">
<div
Expand All @@ -30,7 +30,7 @@ const props = defineProps({
:class="props.class"
>
<slot name="bottom" />
<LayoutFooter />
</div>
<LayoutFooter />
</div>
</template>
4 changes: 2 additions & 2 deletions layouts/window.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="slidev-layout">
<LayoutHeader class="absolute bottom-0 right-0 transform flip-x" />
<LayoutHeader class="absolute bottom-0 right-0 transform rotate-y-180" />
<div
class="top"
>
Expand All @@ -13,7 +13,7 @@
class="bottom"
>
<slot name="bottom" />
<LayoutFooter />
</div>
<LayoutFooter />
</div>
</template>
11 changes: 0 additions & 11 deletions setup/windicss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,5 @@ export default defineWindiSetup(() => ({
},
plugins: [
aspectRatioPlugin,
plugin(function ({ addUtilities, variants }) {
const newUtilities = {
'.flip-y': {
'--tw-scale-y': '-1 !important',
},
'.flip-x': {
'--tw-scale-x': '-1 !important',
},
}
addUtilities(newUtilities, variants('flip'))
}),
],
}))

0 comments on commit 69c90f2

Please sign in to comment.