Display Spacing
1K Views
56 Downloads - 4 API calls
14 Lines - 339 Bytes
Apr 23, 2020 design interface content
1 .gg-display-spacing { 2 box-sizing: border-box;
3 position: relative;
4 display: block;
5 transform: scale(var(--ggs,1 ));
6 height: 14px ;
7 width: 14px ;
8 box-shadow:
9 inset 0 0 0 2px ,
10 2px 0 0 0 ,
11 -2px 0 0 0 ;
12 border-left: 2px solid transparent;
13 border-right: 2px solid transparent
14 }
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="M3 21 V3 H5 V21 H3 Z" fill="currentColor" /> 9 <path 10 fill-rule="evenodd" 11 clip-rule="evenodd" 12 d="M7 3 H17 V21 H7 V3 ZM9 5 V19 H15 V5 H9 Z" 13 fill="currentColor" 14 /> 15 <path d="M19 3 V21 H21 V3 H19 Z" fill="currentColor" /> 16 </svg>
1 import React from 'react' 2 import styled from 'styled-components' 3 4 const StyledDisplaySpacing = styled.i` 5 & { 6 box-sizing: border-box;7 position: relative;8 display: block;9 transform: scale(var(--ggs, 1 ));10 height: 14px ;11 width: 14px ;12 box-shadow: inset 0 0 0 2px , 2px 0 0 0 , -2px 0 0 0 ;13 border-left: 2px solid transparent;14 border-right: 2px solid transparent;15 } 16 ` 17 18 export const DisplaySpacing = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>( 19 (props, ref) => { 20 return ( 21 <> 22 <StyledDisplaySpacing { ...props} ref={ ref} icon-role="display-spacing" /> 23 </> 24 ) 25 } , 26 ) 27
Display Spacing is a magic CSS icon made by using properties like: transform, height, width, box-shadow, border-left, border-right, Some stats, it has: 14 Lines of code at 339b & 244b minified. Pretty wonderful 🤗 huhh.