fill half of svg polygon shape - star - css

I am using this and was looking to add a new css class 'half' to the star selected class, to only fill half the star shape with the background color: #e54800
https://foundation.zurb.com/building-blocks/blocks/star-rating.html
So it would be: <div class="star selected half">
.rating-block {
padding: 2px 5px;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
}
.rating-block .ratings-type {
margin-right: 1rem;
margin-bottom: 0;
}
.rating-block .rating-block {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
margin-bottom: 2rem;
}
.rating-block .rating-block-rating {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.rating-block .star {
cursor: pointer;
stroke: #cc4b37;
}
.rating-block .rating-block-rating .star.selected polygon {
fill: #cc4b37;
}
.rating-block .rating-block-rating.is-voted .star polygon {
fill: #cc4b37;
}
.rating-block .rating-block-rating.is-voted .star.selected ~ .star polygon {
fill: transparent;
}
<div class="rating-block">
<div class="rating-block-rating" data-rating>
<div class="star selected">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="37" viewBox="0 0 40 37">
<polygon fill="none" points="272 30 260.244 36.18 262.489 23.09 252.979 13.82 266.122 11.91 272 0 277.878 11.91 291.021 13.82 281.511 23.09 283.756 36.18" transform="translate(-252)" />
</svg>
</div>
<div class="star">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="37" viewBox="0 0 40 37">
<polygon fill="none" points="272 30 260.244 36.18 262.489 23.09 252.979 13.82 266.122 11.91 272 0 277.878 11.91 291.021 13.82 281.511 23.09 283.756 36.18" transform="translate(-252)" />
</svg>
</div>
<div class="star">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="37" viewBox="0 0 40 37">
<polygon fill="none" points="272 30 260.244 36.18 262.489 23.09 252.979 13.82 266.122 11.91 272 0 277.878 11.91 291.021 13.82 281.511 23.09 283.756 36.18" transform="translate(-252)" />
</svg>
</div>
<div class="star">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="37" viewBox="0 0 40 37">
<polygon fill="none" points="272 30 260.244 36.18 262.489 23.09 252.979 13.82 266.122 11.91 272 0 277.878 11.91 291.021 13.82 281.511 23.09 283.756 36.18" transform="translate(-252)" />
</svg>
</div>
<div class="star">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="37" viewBox="0 0 40 37">
<polygon fill="none" points="272 30 260.244 36.18 262.489 23.09 252.979 13.82 266.122 11.91 272 0 277.878 11.91 291.021 13.82 281.511 23.09 283.756 36.18" transform="translate(-252)" />
</svg>
</div>
</div>
</div>

You can define a gradient using another svg (to avoid repeating it inside each one) and use the gradient with fill. You can easily adjust the % values or create more gradient if you want different other fill
.rating-block {
padding: 2px 5px;
display: flex;
align-items: center;
justify-content: space-between;
}
.rating-block .ratings-type {
margin-right: 1rem;
margin-bottom: 0;
}
.rating-block .rating-block {
display: flex;
align-items: center;
margin-bottom: 2rem;
}
.rating-block .rating-block-rating {
display: flex;
}
.rating-block .star {
cursor: pointer;
stroke: #cc4b37;
}
.rating-block .rating-block-rating .star.selected polygon {
fill: #cc4b37;
}
.rating-block .rating-block-rating .star.half polygon {
fill: url(#grad);
}
.rating-block .rating-block-rating.is-voted .star polygon {
fill: #cc4b37;
}
.rating-block .rating-block-rating.is-voted .star.selected~.star polygon {
fill: transparent;
}
<svg height="0" width="0">
<defs>
<linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" style="stop-color:#cc4b37;stop-opacity:1" />
<stop offset="50%" style="stop-color:#cc4b37;stop-opacity:1" />
<stop offset="50%" style="stop-color:transparent;stop-opacity:1" />
<stop offset="100%" style="stop-color:transparent;stop-opacity:1" />
</linearGradient>
</defs>
</svg>
<div class="rating-block">
<div class="rating-block-rating" data-rating>
<div class="star selected">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="37" viewBox="0 0 40 37">
<polygon fill="none" points="272 30 260.244 36.18 262.489 23.09 252.979 13.82 266.122 11.91 272 0 277.878 11.91 291.021 13.82 281.511 23.09 283.756 36.18" transform="translate(-252)" />
</svg>
</div>
<div class="star half">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="37" viewBox="0 0 40 37">
<polygon fill="none" points="272 30 260.244 36.18 262.489 23.09 252.979 13.82 266.122 11.91 272 0 277.878 11.91 291.021 13.82 281.511 23.09 283.756 36.18" transform="translate(-252)" />
</svg>
</div>
<div class="star">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="37" viewBox="0 0 40 37">
<polygon fill="none" points="272 30 260.244 36.18 262.489 23.09 252.979 13.82 266.122 11.91 272 0 277.878 11.91 291.021 13.82 281.511 23.09 283.756 36.18" transform="translate(-252)" />
</svg>
</div>
<div class="star">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="37" viewBox="0 0 40 37">
<polygon fill="none" points="272 30 260.244 36.18 262.489 23.09 252.979 13.82 266.122 11.91 272 0 277.878 11.91 291.021 13.82 281.511 23.09 283.756 36.18" transform="translate(-252)" />
</svg>
</div>
<div class="star">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="37" viewBox="0 0 40 37">
<polygon fill="none" points="272 30 260.244 36.18 262.489 23.09 252.979 13.82 266.122 11.91 272 0 277.878 11.91 291.021 13.82 281.511 23.09 283.756 36.18" transform="translate(-252)" />
</svg>
</div>
</div>
</div>
By the way here is an easier way to handle the rating without having to use the svg multiple time and define a gradient for the fill. You can use svg as background and simply control the width to control the rating:
.rating{
width: calc(45px * 5);
height: 45px;
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45" viewBox="-40 -40 80 80"><path fill="%23cc4b37" stroke="%23cc4b37" stroke-width="2" d="M 0.000 20.000 L 23.511 32.361 L 19.021 6.180 L 38.042 -12.361 L 11.756 -16.180 L 0.000 -40.000 L -11.756 -16.180 L -38.042 -12.361 L -19.021 6.180 L -23.511 32.361 L 0.000 20.000 "/></svg>');
position:relative;
}
.rating:before {
content:"";
position:absolute;
top:0;
bottom:0;
left:0;
width: calc(45px * 5);
z-index:-1;
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45" viewBox="-40 -40 80 80"><path fill="transparent" stroke="%23cc4b37" stroke-width="2" d="M 0.000 20.000 L 23.511 32.361 L 19.021 6.180 L 38.042 -12.361 L 11.756 -16.180 L 0.000 -40.000 L -11.756 -16.180 L -38.042 -12.361 L -19.021 6.180 L -23.511 32.361 L 0.000 20.000 "/></svg>');
}
<div class="rating">
</div>
<div class="rating" style="width:calc(45px * 2)">
</div>
<div class="rating" style="width:calc(45px * 2.5)">
</div>
<div class="rating" style="width:calc(45px * 4.75)">
</div>
<div class="rating" style="width:calc(45px * 1.75)">
</div>
Can also be improved with CSS variable:
.rating{
width: calc(45px * 5);
height: 45px;
background:
url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45" viewBox="-40 -40 80 80"><path fill="transparent" stroke="%23cc4b37" stroke-width="2" d="M 0.000 20.000 L 23.511 32.361 L 19.021 6.180 L 38.042 -12.361 L 11.756 -16.180 L 0.000 -40.000 L -11.756 -16.180 L -38.042 -12.361 L -19.021 6.180 L -23.511 32.361 L 0.000 20.000 "/></svg>');
position:relative;
}
.rating:before {
content:"";
position:absolute;
top:0;
bottom:0;
left:0;
width: calc(45px * var(--r,1));
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45" viewBox="-40 -40 80 80"><path fill="%23cc4b37" stroke="%23cc4b37" stroke-width="2" d="M 0.000 20.000 L 23.511 32.361 L 19.021 6.180 L 38.042 -12.361 L 11.756 -16.180 L 0.000 -40.000 L -11.756 -16.180 L -38.042 -12.361 L -19.021 6.180 L -23.511 32.361 L 0.000 20.000 "/></svg>');
}
<div class="rating">
</div>
<div class="rating" style="--r:2">
</div>
<div class="rating" style="--r:2.5">
</div>
<div class="rating" style="--r:4.75">
</div>
<div class="rating" style="--r:1.75">
</div>

Related

How to style/animate nested SVG?

I'm learning SVG. This is my animated SVG:
#sky {
animation: skyColor 10s alternate infinite linear;
}
#keyframes skyColor {
0% {
fill: #000000;
}
30% {
fill: #000000;
}
40% {
fill: #303030;
}
50% {
fill: #fffade;
}
60% {
fill: #add1db;
}
100% {
fill: #dcf5fc;
}
}
#sun {
r: 10;
fill: yellow;
}
#bear {
transform: translate(50px, 50px);
}
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="600" height="400">
<defs>
<linearGradient id="snowHillGradient1" x1="0.25" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="#fdfdfd"/>
<stop offset="100%" stop-color="#e0e0e0"/>
</linearGradient>
<linearGradient id="snowHillGradient2" x1="0" x2="0.25" y1="0" y2="1">
<stop offset="0%" stop-color="#fcfcfc"/>
<stop offset="100%" stop-color="#d2d2d2"/>
</linearGradient>
<linearGradient id="snowHillGradient3" x1="0.5" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="#fcfcfc"/>
<stop offset="100%" stop-color="#d6d6d6"/>
</linearGradient>
</defs>
<rect x="0" y="0" width="300" height="200" id="sky"/>
<circle id="sun" cx="150" cy="220">
<animateMotion dur="20s" repeatCount="indefinite" path="m 0 0 a 1 1 0 0 1 0 -220 a 1 1 0 0 1 0 220" />
</circle>
<path id="moon" fill="#f7f7f7" d="M 0 0 a 9 9 0 1 0 3 15 c -13 2 -13 -14 -3 -15" >
<animateMotion dur="20s" repeatCount="indefinite" path="m 150 0 a 1 1 0 0 1 0 220 a 1 1 0 0 1 0 -220" />
</path>
<path fill="url(#snowHillGradient1)" stroke="#f0f0f0" stroke-width="0.25" d="M -20 68 l 212 0 c -68 -50 -181 -29 -212 0" style="transform: scale(3);" />
<path fill="url(#snowHillGradient2)" stroke="#f0f0f0" stroke-width="0.25" d="M -60 85 l 212 0 c -81 -42 -191 -39 -212 0" style="transform: scale(2.2);" />
<path fill="url(#snowHillGradient3)" stroke="#eaeaea" stroke-width="0.25" d="M 4 85 l 212 0 c -68 -50 -181 -29 -212 0" style="transform: scale(2.5);" />
<path fill="url(#snowHillGradient2)" stroke="#f0f0f0" stroke-width="0.25" d="M -44 85 l 212 0 c -81 -32 -183 -21 -212 0" style="transform: scale(2.5);" />
<svg width="100" height="100" id="bear">
<!-- Bear -->
<path stroke="black" stroke-width="1" fill="#543C23" d="m 35 60 l -20 20 l -4 10 l 0 5 l 78 0 l 0 -5 l -4 -10 l -20 -20 " />
<ellipse cx="50" cy="50" rx="30" ry="25" fill="#543C23" stroke="black" />
<ellipse cx="41" cy="45" rx="7" ry="7" fill="white" stroke="black" />
<ellipse cx="58" cy="45" rx="7" ry="7" fill="white" stroke="black" />
<ellipse cx="41" cy="44" rx="3" ry="3" fill="black" stroke="none" />
<ellipse cx="58" cy="44" rx="3" ry="3" fill="black" stroke="none" />
<ellipse cx="49" cy="58" rx="6" ry="4" fill="black" stroke="none" />
<line x1="49" y1="58" x2="49" y2="68" stroke="black" stroke-width="2" />
<polyline points="34,62 41,67 49,68 57,67 64,62" stroke="black" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" />
<path stroke="black" stroke-width="1" fill="#543C23" d="m 25 40 c -5 -10 0 -15 10 -10" />
<path stroke="black" stroke-width="1" fill="#543C23" d="m 75 40 c 5 -10 0 -15 -10 -10" />
<rect x="0" y="0" width="100%" height="100%" stroke="red" fill="none" />
</svg>
<rect x="0" y="0" width="300" height="200" stroke="black" fill="none" />
</svg>
I want to animate/style nested SVG (#bear id).
But even simple
#bear {
transform: translate(50px, 50px);
}
works only in FireFox! But in Chrome it has no effect.
How can I style/animate nested SVG in Chrome?
Maybe there is some other way to animate nested SVG?
Nested SVG is very convenient due to its own coordinate system.
An alternative to a nested <svg> could be <symbol>. A symbol element can also be handled separate to the rest. To show the symbol you then need to use <use> as well -- and that can then be styled (I changed the CSS selector to #usebear).
#sky {
animation: skyColor 10s alternate infinite linear;
}
#keyframes skyColor {
0% {
fill: #000000;
}
30% {
fill: #000000;
}
40% {
fill: #303030;
}
50% {
fill: #fffade;
}
60% {
fill: #add1db;
}
100% {
fill: #dcf5fc;
}
}
#sun {
r: 10;
fill: yellow;
}
#usebear {
transform: translate(50px, 50px);
}
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="600" height="400">
<defs>
<linearGradient id="snowHillGradient1" x1="0.25" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="#fdfdfd"/>
<stop offset="100%" stop-color="#e0e0e0"/>
</linearGradient>
<linearGradient id="snowHillGradient2" x1="0" x2="0.25" y1="0" y2="1">
<stop offset="0%" stop-color="#fcfcfc"/>
<stop offset="100%" stop-color="#d2d2d2"/>
</linearGradient>
<linearGradient id="snowHillGradient3" x1="0.5" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="#fcfcfc"/>
<stop offset="100%" stop-color="#d6d6d6"/>
</linearGradient>
</defs>
<rect x="0" y="0" width="300" height="200" id="sky"/>
<circle id="sun" cx="150" cy="220">
<animateMotion dur="20s" repeatCount="indefinite" path="m 0 0 a 1 1 0 0 1 0 -220 a 1 1 0 0 1 0 220" />
</circle>
<path id="moon" fill="#f7f7f7" d="M 0 0 a 9 9 0 1 0 3 15 c -13 2 -13 -14 -3 -15" >
<animateMotion dur="20s" repeatCount="indefinite" path="m 150 0 a 1 1 0 0 1 0 220 a 1 1 0 0 1 0 -220" />
</path>
<path fill="url(#snowHillGradient1)" stroke="#f0f0f0" stroke-width="0.25" d="M -20 68 l 212 0 c -68 -50 -181 -29 -212 0" style="transform: scale(3);" />
<path fill="url(#snowHillGradient2)" stroke="#f0f0f0" stroke-width="0.25" d="M -60 85 l 212 0 c -81 -42 -191 -39 -212 0" style="transform: scale(2.2);" />
<path fill="url(#snowHillGradient3)" stroke="#eaeaea" stroke-width="0.25" d="M 4 85 l 212 0 c -68 -50 -181 -29 -212 0" style="transform: scale(2.5);" />
<path fill="url(#snowHillGradient2)" stroke="#f0f0f0" stroke-width="0.25" d="M -44 85 l 212 0 c -81 -32 -183 -21 -212 0" style="transform: scale(2.5);" />
<symbol width="100" height="100" id="bear">
<!-- Bear -->
<path stroke="black" stroke-width="1" fill="#543C23" d="m 35 60 l -20 20 l -4 10 l 0 5 l 78 0 l 0 -5 l -4 -10 l -20 -20 " />
<ellipse cx="50" cy="50" rx="30" ry="25" fill="#543C23" stroke="black" />
<ellipse cx="41" cy="45" rx="7" ry="7" fill="white" stroke="black" />
<ellipse cx="58" cy="45" rx="7" ry="7" fill="white" stroke="black" />
<ellipse cx="41" cy="44" rx="3" ry="3" fill="black" stroke="none" />
<ellipse cx="58" cy="44" rx="3" ry="3" fill="black" stroke="none" />
<ellipse cx="49" cy="58" rx="6" ry="4" fill="black" stroke="none" />
<line x1="49" y1="58" x2="49" y2="68" stroke="black" stroke-width="2" />
<polyline points="34,62 41,67 49,68 57,67 64,62" stroke="black" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" />
<path stroke="black" stroke-width="1" fill="#543C23" d="m 25 40 c -5 -10 0 -15 10 -10" />
<path stroke="black" stroke-width="1" fill="#543C23" d="m 75 40 c 5 -10 0 -15 -10 -10" />
<rect x="0" y="0" width="100%" height="100%" stroke="red" fill="none" />
</symbol>
<use href="#bear" id="usebear"/>
<rect x="0" y="0" width="300" height="200" stroke="black" fill="none" />
</svg>

How to set fixed width and height to svg

I want to have fixed dimensions for a marker icon width: 24px and height: 34px, but width and height don't work.
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 24 24" style="background-size:24px 34px;" xml:space="preserve" width="24px" height="34px">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#B71C1C;}
.st2{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
</style>
<g id="Group_1_" transform="translate(7.000004, 5.000002)">
<path class="st0" d="M5,1.1c-2.9,0-5.2,2.3-5.2,5.2c0,2.3,1.3,3.9,2.4,5.2c0.3,0.4,0.6,0.7,0.8,1c0.6,0.8,0.8,1.5,0.9,1.9
C4.1,15,4.3,15.6,5,15.6s0.9-0.6,1.1-1.1s0.4-1.1,0.9-1.9c0.2-0.3,0.5-0.7,0.8-1c1.1-1.3,2.4-2.9,2.4-5.2C10.2,3.4,7.9,1.1,5,1.1z" />
<path class="st1" d="M5,1.6c-2.6,0-4.7,2.1-4.7,4.7c0,2.8,2,4.4,3.1,5.9C4.6,14,4.3,15,5,15s0.4-1.1,1.6-2.8
C7.7,10.7,9.7,9,9.7,6.3C9.7,3.7,7.6,1.6,5,1.6" />
<path class="st2" d="M5,4.5c1,0,1.8,0.8,1.8,1.8S6,8.1,5,8.1S3.2,7.3,3.2,6.3S4,4.5,5,4.5" />
</g>
</svg>
Cleaned up your SVG because you are stacking dimension settings on dimension settings
Up to you to play with viewBox, translate and width
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 180" width="120">
<rect width="100%" height="100%" fill="green" />
<g transform="translate(9, 5)">
<path fill="white"
d="m50 11c-29 0-52 23-52 52c0 23 13 39 24 52c3 4 6 7 8 10c6 8 8 15 9 19c2 6 4 12 11 12s9-6 11-11s4-11 9-19c2-3 5-7 8-10c11-13 24-29 24-52c0-30-23-53-52-53z" />
<path fill="#B71C1C"
d="m50 16c-26 0-47 21-47 47c0 28 20 44 31 59c12 18 9 28 16 28s4-11 16-28c11-15 31-32 31-59c0-26-21-47-47-47" />
<path fill="white" d="m50 45c10 0 18 8 18 18s-8 18-18 18s-18-8-18-18s8-18 18-18" />
</g>
</svg>
d= paths were multiplied by 10 in https://yqnn.github.io/svg-path-editor
That multiplied the viewBox by 10 and got rid of all decimals
Then I resized the viewBox
Your original had a translate(7,5) but it needed an extra shift to-the-right to align in the green rectangle.
Simplified:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 180" width="120">
<rect width="100%" height="100%" fill="green" />
<path fill="#B71C1C" stroke="white" stroke-width="5"
d="m60 16c-29 0-52 23-52 52c0 23 13 39 24 52c3 4 6 7 8 10c6 8 8 15 9 19c2 6 4 12 11 12s9-6 11-11s4-11 9-19c2-3 5-7 8-10c11-13 24-29 24-52c0-30-23-53-52-53z" />
<circle cx="50%" cy="63" r="18" fill="white" />
</svg>

SVG into html size enlarging when it shouldn't

It's my first time working with SVG. I set the artboard to a specific size 60 x 70 px or something close to that but when I load in the browser its huge
.st6 {
fill: none;
stroke: #4d4d4d;
stroke-miterlimit: 10
}
<nav>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 60 70" xml:space="preserve">
<path d="M54.49 70H5.51C2.47 70 0 67.53 0 64.49V5.51C0 2.47 2.47 0 5.51 0h48.98C57.53 0 60 2.47 60 5.51v58.98c0 3.04-2.47 5.51-5.51 5.51z" fill="gray" stroke="#4d4d4d" stroke-miterlimit="10"/>
<path d="M52.44 66H7.56C5.59 66 4 64.41 4 62.44V7.56C4 5.59 5.59 4 7.56 4h44.88C54.41 4 56 5.59 56 7.56v54.88c0 1.97-1.59 3.56-3.56 3.56z" fill="none" stroke="#00f" stroke-width="2" stroke-miterlimit="10"/>
<text transform="translate(11.528 19.33)" font-size="16" font-family="MyriadPro-Regular" fill="#fff">
News
</text>
<path fill="none" stroke="gray" stroke-miterlimit="10" d="M30 65V46"/>
<path class="st6" d="M5.5 46.5h49M30.5 64.5v-18"/>
</svg>
</nav>
Youn just need to set a width / height on your svg
svg {
width: 60px;
height: 70px;
}
<nav>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 60 70" xml:space="preserve">
<style>
.st6{fill:none;stroke:#4d4d4d;stroke-miterlimit:10}
</style>
<path d="M54.49 70H5.51C2.47 70 0 67.53 0 64.49V5.51C0 2.47 2.47 0 5.51 0h48.98C57.53 0 60 2.47 60 5.51v58.98c0 3.04-2.47 5.51-5.51 5.51z" fill="gray" stroke="#4d4d4d" stroke-miterlimit="10"/>
<path d="M52.44 66H7.56C5.59 66 4 64.41 4 62.44V7.56C4 5.59 5.59 4 7.56 4h44.88C54.41 4 56 5.59 56 7.56v54.88c0 1.97-1.59 3.56-3.56 3.56z" fill="none" stroke="#00f" stroke-width="2" stroke-miterlimit="10"/>
<text transform="translate(11.528 19.33)" font-size="16" font-family="MyriadPro-Regular" fill="#fff">
News
</text>
<path fill="none" stroke="gray" stroke-miterlimit="10" d="M30 65V46"/>
<path class="st6" d="M5.5 46.5h49M30.5 64.5v-18"/>
</svg>
</nav>
So even though you may of set the artboard in photoshop / illustrator as 60 x 70 - when it generates the SVG it doesnt actually set the width or height. So if you don't specify its size it will take up all the available space.

Moving svg style properties inline

In Mapbox Studio, svg images with color are imported as black and white. According to the troubleshooting website:
If you are able to add your SVG to Mapbox Studio, but appears black,
it’s likely because you are using tags to assign style
properties rather than using inline style attributes. Mapbox Studio
does not support style properties added in tags.
I am new to editing svgs - how would one assign style properties inline?
My svg code is below:
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22.56 28.71">
<defs>
<style>
.cls-1{fill:#f15824;}
</style>
</defs>
<title>black_only_v3</title>
<g id="svg_9" data-name="svg 9">
<g id="svg_5" data-name="svg 5">
<g id="svg_6" data-name="svg 6">
<path id="svg_7" data-name="svg 7" d="M1.55,15.54C2.71,19,5.46,24,12,28.71,18.56,24,21.3,19,22.45,15.54a11.23,11.23,0,0,0,.83-4.14.59.59,0,0,0,0-.12h0a11.28,11.28,0,1,0-22.56,0s0,0,0,.12A11.19,11.19,0,0,0,1.55,15.54ZM12,2.79a8.7,8.7,0,1,1-8.7,8.7A8.69,8.69,0,0,1,12,2.79Z" transform="translate(-0.72 0)"/>
</g>
</g>
<polygon id="svg_8" data-name="svg 8" class="cls-1" points="11.31 8.14 4.42 11.58 9.59 11.58 11.31 15.03 18.19 11.58 13.03 11.58 11.31 8.14"/>
</g>
</svg>
Probably this will be OK:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22.56 28.71"><path d="M.83 15.54C1.99 19 4.74 24 11.28 28.71 17.84 24 20.58 19 21.73 15.54a11.23 11.23 0 0 0 .83-4.14.59.59 0 0 0 0-.12 11.28 11.28 0 1 0-22.56 0v.12a11.19 11.19 0 0 0 .83 4.14zM11.28 2.79a8.7 8.7 0 1 1-8.7 8.7 8.69 8.69 0 0 1 8.7-8.7z"/><path fill="#f15824" d="M11.31 8.14l-6.89 3.44h5.17l1.72 3.45 6.88-3.45h-5.16l-1.72-3.44z"/></svg>

Is there a way to create a chrome-like tab using CSS?

I have been looking for a Google Chrome-like tab written using CSS but cannot find one.
I am trying to replicate the look in order to use it in a web application or a website.
yeah its possible, with css3
Ive posted a blog about how to its a lil depthy, and sadly enouth not going to work on ie unless you use images
Edit:
Removed old reference to redeyeoperations cause its a link farm now.
This is a bit lighter version also it is up on a 3rd party site, so its less likely to be down.
http://codepen.io/jacoblwe20/pen/DxAJF
Here is the code
var tabs = $('.tabs > li');
tabs.on("click", function(){
tabs.removeClass('active');
$(this).addClass('active');
});
body {
background: #efefef;
font: .8em sans-serif;
margin: 0;
}
.tab-container {
background: #2BA6CB;
margin: 0;
padding: 0;
max-height: 35px;
}
ul.tabs {
margin: 0;
list-style-type: none;
line-height: 35px;
max-height: 35px;
overflow: hidden;
display: inline-block;
padding-right: 20px
}
ul.tabs > li.active {
z-index: 2;
background: #efefef;
}
ul.tabs > li.active:before {
border-color: transparent #efefef transparent transparent;
}
ul.tabs > li.active:after {
border-color: transparent transparent transparent #efefef;
}
ul.tabs > li {
float: right;
margin: 5px -10px 0;
border-top-right-radius: 25px 170px;
border-top-left-radius: 20px 90px;
padding: 0 30px 0 25px;
height: 170px;
background: #ddd;
position: relative;
box-shadow: 0 10px 20px rgba(0, 0, 0, .5);
max-width: 200px;
}
ul.tabs > li > a {
display: inline-block;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
text-decoration: none;
color: #222;
}
ul.tabs > li:before,
ul.tabs > li:after {
content: '';
background: transparent;
height: 20px;
width: 20px;
border-radius: 100%;
border-width: 10px;
top: 0px;
border-style: solid;
position: absolute;
}
ul.tabs > li:before {
border-color: transparent #ddd transparent transparent;
-webkit-transform: rotate(48deg);
-moz-transform: rotate(48deg);
-ms-transform: rotate(48deg);
-o-transform: rotate(48deg);
transform: rotate(48deg);
left: -23px;
}
ul.tabs > li:after {
border-color: transparent transparent transparent #ddd;
-webkit-transform: rotate(-48deg);
-moz-transform: rotate(-48deg);
-ms-transform: rotate(-48deg);
-o-transform: rotate(-48deg);
transform: rotate(-48deg);
right: -17px;
}
/* Clear Fix took for HTML 5 Boilerlate*/
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { zoom: 1; }
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class=tab-container>
<ul class="tabs clearfix" >
<li>
<a href=# >Users</a>
</li>
<li class=active >
<a href=# >Pending Lots</a>
</li>
<li>
<a href=# >Nearby Lots</a>
</li>
<li>
<a href=# >Recent Lots</a>
</li>
</ul>
</div>
<div class=outer-circle></div>
I am just giving some css for getting chrome like tabs, rest its up to you to use as you want.
<style type='text/css'>
.chrome_tab {
width: 150px;
height: 0;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
border-bottom: 20px solid grey;
border-radius: 80px 80px 2px 2px;
color: white;
text-align: center;
}
</style>
<div class='chrome_tab'>
muhammad(peace be upon him)
</div>
demo here
http://jsfiddle.net/GH7d6/
What about this :
http://codepen.io/justd/pen/dPeKEG/
Find tuto here .
#import "compass/css3";
#import "compass";
.tab-container {
background: #8dc8fb;
margin: 0;
padding: 0;
max-height: 40px;
ul {
&.nav-tabs {
margin: 0;
list-style-type: none;
line-height: 40px;
max-height: 40px;
overflow: hidden;
display: inline-block;
#include display-flex;
padding-right: 20px;
border-bottom: 5px solid #f7f7f7;
$color: #c3d5e6;
> li {
$raduis: 28px 145px;
margin: 5px -14px 0;
#include border-top-left-radius($raduis);
#include border-top-right-radius($raduis);
padding: 0 30px 0 25px;
height: 170px;
background: $color;
position: relative;
#include box-shadow(0 4px 6px rgba(0,0,0,.5));
width: 200px;
max-width: 200px;
min-width: 20px;
border:1px solid #aaa;
&:first-child {
margin-left: 0;
}
&:last-of-type {
margin-right: 0;
}
> a {
display: block;
max-width:100%;
text-decoration: none;
color: #222;
padding: 3px 7px;
span {
overflow: hidden;
white-space: nowrap;
display: block;
}
&:focus,
&:hover {
background-color: transparent;
border-color: transparent;
}
.glyphicon-remove {
color: #777;
display: inline-block;
padding:3px;
font-size: 10px;
position:absolute;
z-index: 10;
top:7px;
right: -10px;
#include border-radius(50%);
&:hover {
background: #d39ea3;
color: white;
#include box-shadow(inset 0 1px 1px rgba(0,0,0,.25));
#include text-shadow(0 1px 1px rgba(0,0,0,.25));
}
}
}
&.active {
z-index: 2;
#include background-image(linear-gradient(white, #f7f7f7 30px));
> a {
background-color: transparent;
border-color: transparent;
border-bottom-color: transparent;
&:focus,
&:hover {
background-color: transparent;
border-color: transparent;
border-bottom-color: transparent;
}
}
}
}
.btn {
float: left;
height: 20px;
width: 35px;
min-width: 35px;
max-width: 35px;
margin: 10px 0 0 0;
border-color: #71a0c9;
outline: none;
#include transform(skew(30deg));
&.btn-default {
background: $color;
&:hover {
background: #d2deeb;
}
&:active {
background: #9cb5cc;
}
}
}
}
}
.tab-pane {
padding: 60px 40px;
text-align: center;
&.active {
border-top:1px solid #ddd;
}
}
}
I created here tabs like google chrome stylish UI, you can find the light and dark themes in the attached pen.
<div class="sd-tabs" dark>
<div class="sd-header-tabs">
<div class="sd-group-tabs">
<input class="sd-tab-radio" type="radio" tab id="rTab-1" name="tab">
<label class='sd-tab-label' for='rTab-1'>
<div class="sd-tab-icon">
<svg aria-hidden="true" data-prefix="fab" data-icon="whatsapp"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"
class="svg-inline--fa fa-whatsapp fa-w-14 fa-2x">
<path fill="currentColor"
d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z" />
</svg>
</div>
<div class="sd-tab-desc">Descricao da tab bem grande para teste</div>
<div class="sd-tab-icon sd-tab-close">
<svg aria-hidden="true" data-prefix="fal" data-icon="times" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 320 512" class="svg-inline--fa fa-times fa-w-10 fa-2x">
<path fill="currentColor"
d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z" />
</svg>
</div>
</label>
<input class="sd-tab-radio" type="radio" tab id="rTab-2" name="tab">
<label class='sd-tab-label' for='rTab-2' icon-only>
<div class="sd-tab-icon">
<svg aria-hidden="true" data-prefix="fab" data-icon="whatsapp"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"
class="svg-inline--fa fa-whatsapp fa-w-14 fa-2x">
<path fill="currentColor"
d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z" />
</svg>
</div>
<div class="sd-tab-desc"></div>
<div class="sd-tab-icon sd-tab-close">
<svg aria-hidden="true" data-prefix="fal" data-icon="times" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 320 512" class="svg-inline--fa fa-times fa-w-10 fa-2x">
<path fill="currentColor"
d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z" />
</svg>
</div>
</label>
<input class="sd-tab-radio" type="radio" tab id="rTab-3" name="tab">
<label class='sd-tab-label' for='rTab-3'>
<div class="sd-tab-icon">
<svg aria-hidden="true" data-prefix="fab" data-icon="whatsapp"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"
class="svg-inline--fa fa-whatsapp fa-w-14 fa-2x">
<path fill="currentColor"
d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z" />
</svg>
</div>
<div class="sd-tab-desc">Descricao da tab bem grande para teste</div>
<div class="sd-tab-icon sd-tab-close">
<svg aria-hidden="true" data-prefix="fal" data-icon="times" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 320 512" class="svg-inline--fa fa-times fa-w-10 fa-2x">
<path fill="currentColor"
d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z" />
</svg>
</div>
</label>
<input class="sd-tab-radio" type="radio" tab id="rTab-4" name="tab">
<label class='sd-tab-label' for='rTab-4'>
<div class="sd-tab-icon">
<svg aria-hidden="true" data-prefix="fab" data-icon="whatsapp"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"
class="svg-inline--fa fa-whatsapp fa-w-14 fa-2x">
<path fill="currentColor"
d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z" />
</svg>
</div>
<div class="sd-tab-desc">Descricao da tab bem grande para teste</div>
<div class="sd-tab-icon sd-tab-close">
<svg aria-hidden="true" data-prefix="fal" data-icon="times" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 320 512" class="svg-inline--fa fa-times fa-w-10 fa-2x">
<path fill="currentColor"
d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z" />
</svg>
</div>
</label>
<input class="sd-tab-radio" type="radio" tab id="rTab-5" name="tab">
<label class='sd-tab-label' for='rTab-5'>
<div class="sd-tab-icon">
<svg aria-hidden="true" data-prefix="fab" data-icon="whatsapp"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"
class="svg-inline--fa fa-whatsapp fa-w-14 fa-2x">
<path fill="currentColor"
d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z" />
</svg>
</div>
<div class="sd-tab-desc">Descricao da tab bem grande para teste</div>
<div class="sd-tab-icon sd-tab-close">
<svg aria-hidden="true" data-prefix="fal" data-icon="times" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 320 512" class="svg-inline--fa fa-times fa-w-10 fa-2x">
<path fill="currentColor"
d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z" />
</svg>
</div>
</label>
<input class="sd-tab-radio" type="radio" tab id="rTab-6" name="tab">
<label class='sd-tab-label' for='rTab-6'>
<div class="sd-tab-icon">
<svg aria-hidden="true" data-prefix="fab" data-icon="whatsapp"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"
class="svg-inline--fa fa-whatsapp fa-w-14 fa-2x">
<path fill="currentColor"
d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z" />
</svg>
</div>
<div class="sd-tab-desc">Descricao da tab bem grande para teste</div>
<div class="sd-tab-icon sd-tab-close">
<svg aria-hidden="true" data-prefix="fal" data-icon="times" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 320 512" class="svg-inline--fa fa-times fa-w-10 fa-2x">
<path fill="currentColor"
d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z" />
</svg>
</div>
</label>
<input class="sd-tab-radio" type="radio" tab id="rTab-7" name="tab">
<label class='sd-tab-label' for='rTab-7'>
<div class="sd-tab-icon">
<svg aria-hidden="true" data-prefix="fab" data-icon="whatsapp"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"
class="svg-inline--fa fa-whatsapp fa-w-14 fa-2x">
<path fill="currentColor"
d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z" />
</svg>
</div>
<div class="sd-tab-desc">Descricao da tab bem grande para teste</div>
<div class="sd-tab-icon sd-tab-close">
<svg aria-hidden="true" data-prefix="fal" data-icon="times" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 320 512" class="svg-inline--fa fa-times fa-w-10 fa-2x">
<path fill="currentColor"
d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z" />
</svg>
</div>
</label>
</div>
</div>
</div>

Resources