ant-design / antd-style

css-in-js library with antd v5 token system
https://ant-design.github.io/antd-style/
MIT License
189 stars 29 forks source link

🧐@keyframes、@media是什么样的写法。。 #28

Closed vscing closed 1 year ago

vscing commented 1 year ago

🧐 问题描述

@keyframes、@media是什么样的写法。。

arvinxx commented 1 year ago

和以前一样的写法

liuweiGL commented 1 year ago
import { keyframes } from 'antd-style'

import { FormItemGetStyle } from './interface'

const antShowHelpIn = keyframes('antShowHelpIn', {
  '0%': {
    transform: 'translateY(-5px)',
    opacity: 0
  },
  to: {
    transform: ' translateY(0)',
    opacity: 1
  }
})

export const genAnimationStyle: FormItemGetStyle = (_, { componentCls }) => {
  return {
    [`${componentCls}-help`]: {
      '&-appear, &-enter': {
        animationDuration: '0.3s',
        animationFillMode: 'both',
        animationPlayState: 'paused',
        opacity: 0,
        animationTimingFunction: 'cubic-bezier(0.645, 0.045, 0.355, 1)',

        '&-active': {
          animationPlayState: 'running',
          animationName: antShowHelpIn
        }
      }
    }
  }
}
github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 3.0.1-beta.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 3.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: