Skip to content

Commit

Permalink
Added pointer and flex-direction
Browse files Browse the repository at this point in the history
  • Loading branch information
JulieSagan committed Dec 28, 2024
1 parent 398dad4 commit 337d450
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 27 deletions.
55 changes: 29 additions & 26 deletions 07-lection5/03-toggler/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,40 @@

<body>
<div class="container">
<label class="toggler">
<input class="toggler__input" type="checkbox">
<div class="toggler__state">
<div class="toggler__control">
<i class="toggler__icon" data-feather="circle"></i>
<div class="toggler__group">
<label class="toggler">
<input class="toggler__input" type="checkbox">
<div class="toggler__state">
<div class="toggler__control">
<i class="toggler__icon" data-feather="circle"></i>
</div>
<div class="toggler__label">Off</div>
</div>
<div class="toggler__label">Off</div>
</div>
</label>

<label class="toggler">
<input class="toggler__input" type="checkbox" checked>
<div class="toggler__state">
<div class="toggler__control">
<i class="toggler__icon" data-feather="circle"></i>
</label>

<label class="toggler">
<input class="toggler__input" type="checkbox" checked>
<div class="toggler__state">
<div class="toggler__control">
<i class="toggler__icon" data-feather="circle"></i>
</div>
<div class="toggler__label">On</div>
</div>
<div class="toggler__label">On</div>
</div>
</label>

<label class="toggler">
<input class="toggler__input" type="checkbox" disabled>
<div class="toggler__state">
<div class="toggler__control">
<i class="toggler__icon" data-feather="circle"></i>
</label>

<label class="toggler">
<input class="toggler__input" type="checkbox" disabled>
<div class="toggler__state">
<div class="toggler__control">
<i class="toggler__icon" data-feather="circle"></i>
</div>
<div class="toggler__label">Disabled</div>
</div>
<div class="toggler__label">Disabled</div>
</div>
</label>
</label>
</div>
</div>


<script>
feather.replace();
</script>
Expand Down
8 changes: 7 additions & 1 deletion 07-lection5/03-toggler/toggler.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.toggler {
.toggler__group {
display: flex;
flex-direction: column;
gap: 16px;
}

.toggler {
display: inline-block;
position: relative;
}

Expand Down Expand Up @@ -55,6 +60,7 @@
.toggler__input:disabled ~ .toggler__state .toggler__control {
border-color: var(--grey-2, #DDE2E5);
background-color: var(--grey-2, #DDE2E5);
cursor: default;
}

.toggler__input:disabled ~ .toggler__state .toggler__icon {
Expand Down

0 comments on commit 337d450

Please sign in to comment.