Minimize
2K Views
46 Downloads - 6 API calls
39 Lines - 764 Bytes
Apr 23, 2020 interface arrows
1 .gg-minimize { 2 box-sizing: border-box;
3 position: relative;
4 display: block;
5 transform: scale(var(--ggs,1 ));
6 width: 4px ;
7 height: 4px ;
8 box-shadow:
9 -8px -4px 0 -1px ,
10 -6px -4px 0 -1px ,
11 8px 4px 0 -1px ,
12 6px 4px 0 -1px ,
13 8px -4px 0 -1px ,
14 6px -4px 0 -1px ,
15 -8px 4px 0 -1px ,
16 -6px 4px 0 -1px 17 } 18 19 .gg-minimize::after ,
20 .gg-minimize::before { 21 content: "";
22 display: block;
23 box-sizing: border-box;
24 position: absolute;
25 width: 2px ;
26 height: 18px ;
27 border-top: 6px solid;
28 border-bottom: 6px solid;
29 box-shadow: 18px 0 0 -2px ;
30 top: -7px 31 } 32 33 .gg-minimize::after { 34 left: -3px 35 } 36 37 .gg-minimize::before { 38 right: -3px 39 }
1 <svg 2 width="24 " 3 height="24 " 4 viewBox="0 0 24 24 " 5 fill="none" 6 xmlns="http://www.w3 .org/2000 /svg" 7 > 8 <path d="M9 9 H3 V7 H7 V3 H9 V9 Z" fill="currentColor" /> 9 <path d="M9 15 H3 V17 H7 V21 H9 V15 Z" fill="currentColor" /> 10 <path d="M21 15 H15 V21 H17 V17 H21 V15 Z" fill="currentColor" /> 11 <path d="M15 9.00012 H21 V7.00012 H17 V3.00012 H15 V9.00012 Z" fill="currentColor" /> 12 </svg>
1 import React from 'react' 2 import styled from 'styled-components' 3 4 const StyledMinimize = styled.i` 5 & { 6 box-sizing: border-box;7 position: relative;8 display: block;9 transform: scale(var(--ggs, 1 ));10 width: 4px ;11 height: 4px ;12 box-shadow: -8px -4px 0 -1px , -6px -4px 0 -1px , 8px 4px 0 -1px , 6px 4px 0 -1px , 8px -4px 0 -1px ,13 6px -4px 0 -1px , -8px 4px 0 -1px , -6px 4px 0 -1px ; 14 } 15 &::after , 16 &::before { 17 content: '';18 display: block;19 box-sizing: border-box;20 position: absolute;21 width: 2px ;22 height: 18px ;23 border-top: 6px solid;24 border-bottom: 6px solid;25 box-shadow: 18px 0 0 -2px ;26 top: -7px ;27 } 28 &::after { 29 left: -3px ;30 } 31 &::before { 32 right: -3px ;33 } 34 ` 35 36 export const Minimize = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>( 37 (props, ref) => { 38 return ( 39 <> 40 <StyledMinimize { ...props} ref={ ref} icon-role="minimize" /> 41 </> 42 ) 43 } , 44 ) 45
Minimize turned into a wonderful CSS icon made by practicing attributes as follows: transform, width, height, box-shadow, border-top, border-bottom, .gg-minimize, Fun to know, it has: 39 Lines of code at 764b & 526b after compiling. Quite marvelous 💎 huhh.