Usb
2K Views
53 Downloads - 14 API calls
32 Lines - 685 Bytes
Apr 23, 2020 multimedia signs
1 .gg-usb,
2 .gg-usb::before { 3 display: block;
4 box-sizing: border-box
5 } 6 7 .gg-usb { 8 position: relative;
9 width: 14px ;
10 height: 14px ;
11 border: 2px solid;
12 transform: scale(var(--ggs,1 ));
13 margin-bottom: -6px ;
14 border-bottom-left-radius: 3px ;
15 border-bottom-right-radius: 3px 16 } 17 18 .gg-usb::before { 19 content: "";
20 position: absolute;
21 width: 6px ;
22 height: 5px ;
23 border-left: 1px solid transparent;
24 border-right: 1px solid transparent;
25 border-top: 1px solid transparent;
26 border-bottom: 2px solid transparent;
27 box-shadow: 0 0 0 2px ,
28 inset 5px 4px 0 -4px ,
29 inset -5px 4px 0 -4px ;
30 top: -7px ;
31 left: 2px 32 }
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="M10 4.5 H11 V6.5 H10 V4.5 Z" fill="currentColor" /> 9 <path d="M14 4.5 H13 V6.5 H14 V4.5 Z" fill="currentColor" /> 10 <path 11 fill-rule="evenodd" 12 clip-rule="evenodd" 13 d="M7 8.5 V1.5 H17 V8.5 H19 V19.5 C19 21.1569 17.6569 22.5 16 22.5 H8 C6.34315 22.5 5 21.1569 5 19.5 V8.5 H7 ZM9 3.5 H15 V8.5 H9 V3.5 ZM17 10.5 H7 V19.5 C7 20.0523 7.44772 20.5 8 20.5 H16 C16.5523 20.5 17 20.0523 17 19.5 V10.5 Z" 14 fill="currentColor" 15 /> 16 </svg>
1 import React from 'react' 2 import styled from 'styled-components' 3 4 const StyledUsb = styled.i` 5 &, 6 &::before { 7 display: block;8 box-sizing: border-box;9 } 10 & { 11 position: relative;12 width: 14px ;13 height: 14px ;14 border: 2px solid;15 transform: scale(var(--ggs, 1 ));16 margin-bottom: -6px ;17 border-bottom-left-radius: 3px ;18 border-bottom-right-radius: 3px ;19 } 20 &::before { 21 content: '';22 position: absolute;23 width: 6px ;24 height: 5px ;25 border-left: 1px solid transparent;26 border-right: 1px solid transparent;27 border-top: 1px solid transparent;28 border-bottom: 2px solid transparent;29 box-shadow: 0 0 0 2px , inset 5px 4px 0 -4px , inset -5px 4px 0 -4px ;30 top: -7px ;31 left: 2px ;32 } 33 ` 34 35 export const Usb = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>( 36 (props, ref) => { 37 return ( 38 <> 39 <StyledUsb { ...props} ref={ ref} icon-role="usb" /> 40 </> 41 ) 42 } , 43 ) 44
Usb became a magic CSS icon built by adopting properties such as: .gg-usb, width, height, border, transform, border-left, border-right, border-top, border-bottom, box-shadow, Some stats, it has: 32 Lines of code at 685b & 522b minified. Truly marvelous 💎 for a icon designed by code.