CSS Battle #6 – Missing Slice #861
Replies: 8 comments 11 replies
-
Using borders<div></div>
<style>
body {
background: #E3516E;
display: grid;
place-items: center;
}
div{
border-radius: 50%;
border: 100px solid transparent;
border-top-color: #FADE8B;
border-left-color: #51B5A9;
border-bottom-color: #F7F3D7;
transform: rotate(45deg);
}
</style> |
Beta Was this translation helpful? Give feedback.
-
I wrote text until shapes happened (391 characters)<div id="c"><p></p><p id="y"></p><p id="w"></p></div>
<style>
body {
background: #E3516E;
padding: 42px 92px;
}
p {
width: 100px;
height: 100px;
margin: 0;
background: #51B5A9;
}
#c {
display: grid;
grid-template-columns: 1fr 1fr;
clip-path: circle(50% at 50%)
}
#y {
background: #FADE8B;
}
#w {
background: #F7F3D7;
}
</style> |
Beta Was this translation helpful? Give feedback.
-
My first attempt using
|
Beta Was this translation helpful? Give feedback.
-
Using conic-gradient
<div></div>
<style>
* {
background: #E3516E;
}
div {
margin: 13% auto;
width: 200px;
height: 200px;
background: conic-gradient(#FADE8B 25%, #E3516E 25% 50%, #F7F3D7 50% 75%, #51B5A9 25% );
border-radius: 50%;
}
</style> |
Beta Was this translation helpful? Give feedback.
-
Gradients without elements! 132 chars thanks to looking at @meg-gutshall solution with percentages 😅<style>*{background:radial-gradient(circle,#0000 100px,#E3516E 0),conic-gradient(#FADE8B 25%,#E3516E 0 50%, #F7F3D7 0 75%,#51B5A9 0) |
Beta Was this translation helpful? Give feedback.
-
My first pass (haven't looked at anyone else's yet!) Unminified for viewing using `conic-gradient`:<style>
*{
background: #E3516E;
}
*>*{
background:conic-gradient(#FADE8B 0 90deg,#0000 90deg 180deg,#F7F3D7 180deg 270deg,#51B5A9 270deg);
border-radius:50%;
margin:50 100
} Minified: 687.89 (159 chars):<style>*{background:#E3516E}*>*{border-radius:50%;margin:50 100;background:conic-gradient(#FADE8B 90deg,#0000 90deg 180deg,#F7F3D7 180deg 270deg,#51B5A9 270deg |
Beta Was this translation helpful? Give feedback.
-
Turns out I had done this one a while ago - here's my solution that time - border color and Minified: 707.36 {138 chars}:<style>*{background:#E3516E}*>*{border:25vw solid;border-color:#51B5A9 #FADE8B #0000 #F7F3D7;margin:50 100;border-radius:50%;rotate:-45deg |
Beta Was this translation helpful? Give feedback.
-
Code Source – score 611.99 {368 chars}<div></div>
<style>
body{
margin: 0;
background-color:#E3516E;
display: grid;
place-items: center;
height: 100vh;
}
div {
width: 200px;
height: 200px;
border-radius: 100px;
background: conic-gradient(from -90deg at 50% 50%, #51B5A9 90deg, #FADE8B 90deg, #FADE8B 180deg, #E3516E 180deg, #E3516E 270deg, #F7F3D7 0);
}
</style> |
Beta Was this translation helpful? Give feedback.
-
Link to battle:
Let's battle! ⚔️
Copy the code block below to format your comment on the discussion thread:
What others will see:
This will result in a nice hidden bit like so:
Code Source – score {character count}
Beta Was this translation helpful? Give feedback.
All reactions