Interactive Bullet list
Just a quick test to see if there was a non-JS way to create an interactive bullet list.
Breakpoint is at 500px, which removes the css-grid. While this isn't the prettiest solution, it's one approach. If it's important to have the option of having more than one list item viewable at a time, then I would consider a snippet of javascript to change the radio buttons to checkboxes on smaller screens... but I would also argue against doing that.
Id ut fair kopi spice brewed mug rich shop doppio in qui iced spoon black. Steamed acerbic siphon aftertaste in iced coffee carajillo. Seasonal spice origin viennese bar doppio au at cinnamon extraction. So brewed fair percolator redeye frappuccino coffee seasonal.Spoon go trifecta variety breve flavour chicory plunger pumpkin caramelization foam frappuccino qui turkish.
Andouille tenderloin venison ground tongue capicola cupim shoulder tip porchetta. Capicola tongue sausage tail buffalo sausage steak sirloin. Mignon turducken loin brisket turducken buffalo pastrami tongue buffalo sausage hock buffalo porchetta burgdoggen ball. Shoulder tongue short belly capicola corned pancetta doner chicken brisket. Leberkas t landjaeger loin frankfurter rump ball rump drumstick sausage kielbasa hock bone rump.
Dive bottom generated to streamlined day a end table on holistic clickthroughs management. Start convergence on grow domination organically your management performing corporate of real overall. Strategy towards domination to day win robust change approaches frameworks long. Domination offline high collaborative generated that operational collaborative provide. Day overall seamless thinking domination empowerment leverage proposition.
Beans gummi pudding cheesecake wafer cake pudding biscuit cookie pastry cake. Candy carrot donut fruitcake tiramisu apple donut jelly fruitcake tootsie pie tiramisu halvah. Bears danish tootsie chocolate sesame croissant plum cupcake brownie chups roll marzipan gummies topping bear. Bonbon lemon dragée danish chocolate topping pie dessert. Claw bears sesame dragée cupcake jelly dragée halvah carrot chups muffin topping roll macaroon oat.
Fromage edam mascarpone paneer mascarpone taleggio pepper frais. Jarlsberg grin loves port melted roquefort queso happy big frais toast and. Castello brie caerphilly on boursin strings boursin leicester cut s port strings. Cauliflower roquefort comes parmesan s cheesecake airedale cheeseburger leicester. Monsieur jack cheese everybody fondue pecorino cheeseburger cheesecake fontina red.
Standard setup for radio buttons
<div class="bullets">
<input type="radio" name="bullets" id="bullet-1" class="bullet-control">
<label for="bullet-1" class="bullet-label">Coffee</label>
<div class="bullet-item"> ... </div>
</div>
Pretty simple styling on this. Just css-grid and our old friend, the radio button
.bullets {
background: white;
padding: 1.2rem;
display: grid;
grid-template-columns: 1fr 3fr;
grid-template-rows: repeat(5, 3rem) auto;
}
.bullet-control {
display: none;
width: 0;
}
.bullet-label {
grid-column: 1 / 2;
color: var(--dark-gray);
height: 3rem;
line-height: 3rem;
cursor: pointer;
position: relative;
padding-left: 1.2rem;
}
.bullet-label:hover {
color: var(--olive);
}
.bullet-item {
grid-column: 2 / 3;
grid-row: 1 / 7;
display: none;
}
.bullet-control:checked + .bullet-label {
color: var(--cta);
}
.bullet-control:checked + .bullet-label::before {
content:'';
width: 0;
height: 0;
border: 4px solid transparent;
border-left-color: var(--cta);
position: absolute;
left: 0;
top: calc(50% - .3rem);
}
.bullet-control:checked + .bullet-label + .bullet-item {
display: block;
border-left: 1px solid var(--olive);
padding-left: 1.2rem;
}
@media (max-width: 500px) {
.bullets {
display: block;
}
.bullet-label {
display: block;
padding-left: 0;
font-weight: bold;
}
.bullet-label::after {
content:'';
width: .8rem;
height: .8rem;
border: 1px solid transparent;
border-color: black black transparent transparent;
display: inline-block;
margin-left: .3rem;
transform: rotate(45deg);
transition: transform .6s;
}
.bullet-item {
display: block;
overflow: hidden;
max-height: 0;
transition: max-height .5s;
}
.bullet-control:checked + .bullet-label::before {
border:none;
}
.bullet-control:checked + .bullet-label::after {
border-color: var(--cta) var(--cta) transparent transparent;
margin-left: .9rem;
position: relative;
top: -.2rem;
transform: rotate(135deg);
}
.bullet-control:checked + .bullet-label + .bullet-item {
max-height: 500px;
transition: max-height 1s;
border-left: none;
padding-left: 0;
}
}