chore: rename @vben-core -> @core
This commit is contained in:
86
packages/@core/shared/design/src/scss/common/base.scss
Normal file
86
packages/@core/shared/design/src/scss/common/base.scss
Normal file
@@ -0,0 +1,86 @@
|
||||
#app,
|
||||
.ant-app,
|
||||
body,
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overscroll-behavior: none;
|
||||
}
|
||||
|
||||
*,
|
||||
::after,
|
||||
::before {
|
||||
@apply border-border;
|
||||
|
||||
box-sizing: border-box;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
body.invert-mode {
|
||||
@apply invert;
|
||||
}
|
||||
|
||||
body.grayscale-mode {
|
||||
@apply grayscale;
|
||||
}
|
||||
|
||||
html {
|
||||
@apply text-foreground bg-background;
|
||||
|
||||
// font-size: 62.5%;
|
||||
font-variation-settings: normal;
|
||||
text-size-adjust: 100%;
|
||||
font-synthesis-weight: none;
|
||||
scroll-behavior: smooth;
|
||||
text-rendering: optimizelegibility;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
a,
|
||||
a:active,
|
||||
a:hover,
|
||||
a:link,
|
||||
a:visited {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
::view-transition-new(root),
|
||||
::view-transition-old(root) {
|
||||
mix-blend-mode: normal;
|
||||
animation: none;
|
||||
}
|
||||
|
||||
::view-transition-old(root) {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
::view-transition-new(root) {
|
||||
z-index: 2147483646;
|
||||
}
|
||||
|
||||
html.dark::view-transition-old(root) {
|
||||
z-index: 2147483646;
|
||||
}
|
||||
|
||||
html.dark::view-transition-new(root) {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
input::placeholder,
|
||||
textarea::placeholder {
|
||||
// color: hsl(var(--color-input-placeholder)) !important;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
input:-webkit-autofill {
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1000px transparent inset;
|
||||
}
|
||||
|
||||
input[type='number']::-webkit-inner-spin-button,
|
||||
input[type='number']::-webkit-outer-spin-button {
|
||||
margin: 0;
|
||||
appearance: none;
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
$namespace: 'vben' !default;
|
||||
$common-separator: '-' !default;
|
||||
$element-separator: '__' !default;
|
||||
$modifier-separator: '--' !default;
|
||||
$state-prefix: 'is' !default;
|
34
packages/@core/shared/design/src/scss/global.scss
Normal file
34
packages/@core/shared/design/src/scss/global.scss
Normal file
@@ -0,0 +1,34 @@
|
||||
@forward './common/constants.scss';
|
||||
|
||||
@mixin b($block) {
|
||||
$B: $namespace + '-' + $block !global;
|
||||
|
||||
.#{$B} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin e($name) {
|
||||
@at-root {
|
||||
&#{$element-separator}#{$name} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin m($name) {
|
||||
@at-root {
|
||||
&#{$modifier-separator}#{$name} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// block__element.is-active {}
|
||||
@mixin is($state, $prefix: $state-prefix) {
|
||||
@at-root {
|
||||
&.#{$prefix}-#{$state} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
4
packages/@core/shared/design/src/scss/index.scss
Normal file
4
packages/@core/shared/design/src/scss/index.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
/** css 样式重置 */
|
||||
@import 'modern-normalize/modern-normalize.css';
|
||||
@import './common/base';
|
||||
@import './transition';
|
@@ -0,0 +1,81 @@
|
||||
@keyframes fade-slide {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateX(-30px);
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: translateX(30px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fade {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fade-up {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(10%);
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: translateY(-10%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fade-down {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(-10%);
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: translateY(10%);
|
||||
}
|
||||
}
|
||||
|
||||
.fade-slow {
|
||||
animation: fade 3s infinite;
|
||||
}
|
||||
|
||||
// .fade-slide-fast {
|
||||
// animation: fade-slide 0.3s infinite;
|
||||
// }
|
||||
|
||||
.fade-slide-slow {
|
||||
animation: fade-slide 3s infinite;
|
||||
}
|
||||
|
||||
.fade-up-slow {
|
||||
animation: fade-up 3s infinite;
|
||||
}
|
||||
|
||||
.fade-down-slow {
|
||||
animation: fade-down 3s infinite;
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
.collapse-transition {
|
||||
transition:
|
||||
0.2s height ease-in-out,
|
||||
0.2s padding-top ease-in-out,
|
||||
0.2s padding-bottom ease-in-out;
|
||||
}
|
||||
|
||||
.collapse-transition-leave-active,
|
||||
.collapse-transition-enter-active {
|
||||
transition:
|
||||
0.2s max-height ease-in-out,
|
||||
0.2s padding-top ease-in-out,
|
||||
0.2s margin-top ease-in-out;
|
||||
}
|
97
packages/@core/shared/design/src/scss/transition/fade.scss
Normal file
97
packages/@core/shared/design/src/scss/transition/fade.scss
Normal file
@@ -0,0 +1,97 @@
|
||||
.fade-transition {
|
||||
&-enter-active,
|
||||
&-leave-active {
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
&-enter-from,
|
||||
&-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* fade-slide */
|
||||
.fade-slide-leave-active,
|
||||
.fade-slide-enter-active {
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.fade-slide-enter-from {
|
||||
opacity: 0;
|
||||
transform: translateX(-30px);
|
||||
}
|
||||
|
||||
.fade-slide-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateX(30px);
|
||||
}
|
||||
|
||||
// ///////////////////////////////////////////////
|
||||
// Fade down
|
||||
// ///////////////////////////////////////////////
|
||||
|
||||
// Speed: 1x
|
||||
.fade-down-enter-active,
|
||||
.fade-down-leave-active {
|
||||
transition:
|
||||
opacity 0.25s,
|
||||
transform 0.3s;
|
||||
}
|
||||
|
||||
.fade-down-enter-from {
|
||||
opacity: 0;
|
||||
transform: translateY(-10%);
|
||||
}
|
||||
|
||||
.fade-down-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(10%);
|
||||
}
|
||||
|
||||
// fade-scale
|
||||
.fade-scale-leave-active,
|
||||
.fade-scale-enter-active {
|
||||
transition: all 0.28s;
|
||||
}
|
||||
|
||||
.fade-scale-enter-from {
|
||||
opacity: 0;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.fade-scale-leave-to {
|
||||
opacity: 0;
|
||||
transform: scale(0.8);
|
||||
}
|
||||
|
||||
// ///////////////////////////////////////////////
|
||||
// Fade Top
|
||||
// ///////////////////////////////////////////////
|
||||
|
||||
// Speed: 1x
|
||||
.fade-up-enter-active,
|
||||
.fade-up-leave-active {
|
||||
transition:
|
||||
opacity 0.2s,
|
||||
transform 0.25s;
|
||||
}
|
||||
|
||||
.fade-up-enter-from {
|
||||
opacity: 0;
|
||||
transform: translateY(10%);
|
||||
}
|
||||
|
||||
.fade-up-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(-10%);
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
@import './slide';
|
||||
@import './fade';
|
||||
@import './animation';
|
||||
@import './collapse';
|
10
packages/@core/shared/design/src/scss/transition/mixin.scss
Normal file
10
packages/@core/shared/design/src/scss/transition/mixin.scss
Normal file
@@ -0,0 +1,10 @@
|
||||
@mixin transition() {
|
||||
&-enter-active,
|
||||
&-leave-active {
|
||||
transition: 0.25s cubic-bezier(0.25, 0.8, 0.5, 1);
|
||||
}
|
||||
|
||||
&-move {
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
}
|
41
packages/@core/shared/design/src/scss/transition/slide.scss
Normal file
41
packages/@core/shared/design/src/scss/transition/slide.scss
Normal file
@@ -0,0 +1,41 @@
|
||||
@use 'mixin.scss' as *;
|
||||
|
||||
.slide-up {
|
||||
@include transition;
|
||||
|
||||
&-enter-from,
|
||||
&-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(-15px);
|
||||
}
|
||||
}
|
||||
|
||||
.slide-down {
|
||||
@include transition;
|
||||
|
||||
&-enter-from,
|
||||
&-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(15px);
|
||||
}
|
||||
}
|
||||
|
||||
.slide-left {
|
||||
@include transition;
|
||||
|
||||
&-enter-from,
|
||||
&-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateX(-15px);
|
||||
}
|
||||
}
|
||||
|
||||
.slide-right {
|
||||
@include transition;
|
||||
|
||||
&-enter-from,
|
||||
&-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateX(15px);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user