atomic-css/index.html

89 lines
2.0 KiB
HTML
Raw Normal View History

2021-09-08 13:21:22 -04:00
<!DOCTYPE html>
<html>
<head>
<style>
.block
{
position:relative;
display: flex;
align-items: stretch;
margin: 0;
padding: 0;
border: 0;
background:lightgrey;
border-radius: 5px;
}
2021-09-08 14:52:42 -04:00
.block > *
2021-09-08 13:21:22 -04:00
{
2021-09-08 14:52:42 -04:00
padding:10px 0 10px 10px;
2021-09-08 13:21:22 -04:00
}
2021-09-08 14:52:42 -04:00
.block > *:last-child
2021-09-08 14:05:57 -04:00
{
2021-09-08 14:52:42 -04:00
padding-right: 10px;
2021-09-08 14:05:57 -04:00
}
2021-09-08 14:21:13 -04:00
2021-09-08 14:52:42 -04:00
.block label
{
width:100%;
}
.block input[type='radio']
2021-09-08 14:05:57 -04:00
{
2021-09-08 14:21:13 -04:00
display: block;
position: relative;
margin: 0;
2021-09-08 14:05:57 -04:00
appearance: none;
}
2021-09-08 14:52:42 -04:00
.block input[type='radio']::before
2021-09-08 14:05:57 -04:00
{
content: " ";
display: block;
position: relative;
width: 17px;
height: 17px;
border: 2px solid #000;
border-radius: 20px;
}
2021-09-08 14:52:42 -04:00
.block input[type='radio']:checked::after
2021-09-08 14:05:57 -04:00
{
content: " ";
display: block;
position: absolute;
width: 11px;
height: 11px;
2021-09-08 14:21:13 -04:00
top: 15px;
left: 15px;
2021-09-08 14:05:57 -04:00
border-radius: 20px;
background: #000;
}
2021-09-08 13:21:22 -04:00
</style>
</head>
<body>
<form>
2021-09-08 14:05:57 -04:00
<div class="block">
2021-09-08 14:52:42 -04:00
<input id="check-1" type="radio" name="slot-1" value="option-1"/>
<label for="check-1">
<strong>Credit Card</strong><br>
<span>Credit Card</span><br>
<span>Credit Card</span><br>
<span>Credit Card</span><br>
2021-09-08 14:21:13 -04:00
<span>Credit Card</span>
2021-09-08 14:05:57 -04:00
</label>
2021-09-08 14:52:42 -04:00
<a href="/">Change</a>
2021-09-08 14:05:57 -04:00
</div>
2021-09-08 13:21:22 -04:00
<div class="block">
2021-09-08 14:52:42 -04:00
<input id="check-2" type="radio" name="slot-1" value="option-2"/>
<label for="check-2">
<strong>Paypal</strong><br>
<span>also good</span>
</label>
<a href="/">Change</a>
2021-09-08 13:21:22 -04:00
</div>
2021-09-08 14:05:57 -04:00
2021-09-08 13:21:22 -04:00
</form>
</body>
</html>