File size: 2,013 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import { style } from '@vanilla-extract/css'
import { vars } from '../../styles/theme-contract.css'
import { XXS } from '../../styles/fontStyles.css'
import { recipe } from '@vanilla-extract/recipes'
import { darkThemeClass } from '../../styles/dark-theme.css'

export const navIconWrapper = recipe({
  base: {
    position: 'relative',
    zIndex: vars.zIndices['2'],
    display: 'flex',
    alignItems: 'center',
    margin: vars.space['15'],
  },

  variants: {
    isRoute: {
      true: {
        color: vars.colors.steel100,

        selectors: {
          [`${darkThemeClass} &`]: {
            color: '#363645',
          },
        },
      },
    },
  },
})

export const navIconLabel = style([
  XXS,
  {
    fontWeight: vars.fontWeights.bold,
    marginLeft: vars.space['15'],
  },
])

export const navAnchor = recipe({
  base: {
    height: '4.6rem',
    width: '4.6rem',
    color: vars.colors.steel100,
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
    position: 'relative',
    borderRadius: vars.radii.r4,
    padding: 2,
    backgroundClip: 'content-box',

    ':before': {
      content: '',
      position: 'absolute',
      left: 0,
      right: 0,
      top: 0,
      bottom: 0,
      zIndex: -1,
      borderRadius: 'inherit',
      opacity: 0,
      background: vars.colors.redYellowGradient100,
    },

    '@media': {
      '(prefers-reduced-motion: no-preference)': {
        ':before': {
          transition: 'opacity 250ms ease-out',
        },
      },
    },
  },

  variants: {
    active: {
      true: {
        background: vars.colors.redYellowGradient100,
      },
      false: {
        backgroundColor: '$white',

        '@media': {
          '(hover: hover)': {
            selectors: {
              '&:hover:before': {
                opacity: 1,
              },
            },
          },
        },
      },
    },
    variant: {
      withLabel: {
        width: '100%',
        justifyContent: 'flex-start',
      },
    },
  },
})