summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkAnalogClock.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-01-14 11:46:22 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-01-14 11:46:22 +0900
commit1e5d4db0a17f1b9f807300c16dcc619e93047589 (patch)
tree34687e482c9aec9f04c694f2c3f4a1c3de456348 /packages/frontend/src/components/MkAnalogClock.vue
parentrefactor(client): use css modules (diff)
downloadmisskey-1e5d4db0a17f1b9f807300c16dcc619e93047589.tar.gz
misskey-1e5d4db0a17f1b9f807300c16dcc619e93047589.tar.bz2
misskey-1e5d4db0a17f1b9f807300c16dcc619e93047589.zip
refactor(client): use css modules
Diffstat (limited to 'packages/frontend/src/components/MkAnalogClock.vue')
-rw-r--r--packages/frontend/src/components/MkAnalogClock.vue27
1 files changed, 13 insertions, 14 deletions
diff --git a/packages/frontend/src/components/MkAnalogClock.vue b/packages/frontend/src/components/MkAnalogClock.vue
index 40ef626aed..139e49cc40 100644
--- a/packages/frontend/src/components/MkAnalogClock.vue
+++ b/packages/frontend/src/components/MkAnalogClock.vue
@@ -1,5 +1,5 @@
<template>
-<svg class="mbcofsoe" viewBox="0 0 10 10" preserveAspectRatio="none">
+<svg :class="$style.root" viewBox="0 0 10 10" preserveAspectRatio="none">
<template v-if="props.graduations === 'dots'">
<circle
v-for="(angle, i) in graduationsMajor"
@@ -39,8 +39,7 @@
-->
<line
- class="s"
- :class="{ animate: !disableSAnimate && sAnimation !== 'none', elastic: sAnimation === 'elastic', easeOut: sAnimation === 'easeOut' }"
+ :class="[$style.s, { [$style.animate]: !disableSAnimate && sAnimation !== 'none', [$style.elastic]: sAnimation === 'elastic', [$style.easeOut]: sAnimation === 'easeOut' }]"
:x1="5 - (0 * (sHandLengthRatio * handsTailLength))"
:y1="5 + (1 * (sHandLengthRatio * handsTailLength))"
:x2="5 + (0 * ((sHandLengthRatio * 5) - handsPadding))"
@@ -205,21 +204,21 @@ onBeforeUnmount(() => {
});
</script>
-<style lang="scss" scoped>
-.mbcofsoe {
+<style lang="scss" module>
+.root {
display: block;
+}
- > .s {
- will-change: transform;
- transform-origin: 50% 50%;
+.s {
+ will-change: transform;
+ transform-origin: 50% 50%;
- &.animate.elastic {
- transition: transform .2s cubic-bezier(.4,2.08,.55,.44);
- }
+ &.animate.elastic {
+ transition: transform .2s cubic-bezier(.4,2.08,.55,.44);
+ }
- &.animate.easeOut {
- transition: transform .7s cubic-bezier(0,.7,.3,1);
- }
+ &.animate.easeOut {
+ transition: transform .7s cubic-bezier(0,.7,.3,1);
}
}
</style>