( theme: 'light' | 'dark', css: (typeof goober)['css'], )
| 2843 | } |
| 2844 | |
| 2845 | const stylesFactory = ( |
| 2846 | theme: 'light' | 'dark', |
| 2847 | css: (typeof goober)['css'], |
| 2848 | ) => { |
| 2849 | const { colors, font, size, alpha, shadow, border } = tokens |
| 2850 | |
| 2851 | const t = (light: string, dark: string) => (theme === 'light' ? light : dark) |
| 2852 | |
| 2853 | return { |
| 2854 | devtoolsBtn: css` |
| 2855 | z-index: 100000; |
| 2856 | position: fixed; |
| 2857 | padding: 4px; |
| 2858 | text-align: left; |
| 2859 | |
| 2860 | display: flex; |
| 2861 | align-items: center; |
| 2862 | justify-content: center; |
| 2863 | border-radius: 9999px; |
| 2864 | box-shadow: ${shadow.md()}; |
| 2865 | overflow: hidden; |
| 2866 | |
| 2867 | & div { |
| 2868 | position: absolute; |
| 2869 | top: -8px; |
| 2870 | left: -8px; |
| 2871 | right: -8px; |
| 2872 | bottom: -8px; |
| 2873 | border-radius: 9999px; |
| 2874 | -webkit-transform: translateZ(0); |
| 2875 | transform: translateZ(0); |
| 2876 | |
| 2877 | & svg { |
| 2878 | position: absolute; |
| 2879 | width: 100%; |
| 2880 | height: 100%; |
| 2881 | } |
| 2882 | filter: blur(6px) saturate(1.2) contrast(1.1); |
| 2883 | } |
| 2884 | |
| 2885 | &:focus-within { |
| 2886 | outline-offset: 2px; |
| 2887 | outline: 3px solid ${colors.green[600]}; |
| 2888 | } |
| 2889 | |
| 2890 | & button { |
| 2891 | position: relative; |
| 2892 | z-index: 1; |
| 2893 | padding: 0; |
| 2894 | border-radius: 9999px; |
| 2895 | background-color: transparent; |
| 2896 | border: none; |
| 2897 | height: 40px; |
| 2898 | display: flex; |
| 2899 | width: 40px; |
| 2900 | overflow: hidden; |
| 2901 | cursor: pointer; |
| 2902 | outline: none; |
no test coverage detected