Skip to content

Commit

Permalink
Fixed some visual issues with dropdown menu
Browse files Browse the repository at this point in the history
  • Loading branch information
v6ctor committed Oct 22, 2023
1 parent 79bcd09 commit bd5eb37
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 221 deletions.
183 changes: 58 additions & 125 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ body {
border-radius: 4px;
border-width: 1.5px;
width: 15%;
height: 22.9px;
margin-top: 14.8px;
height: 24px;
margin-top: 13px;
margin-right: 30px;
background-color: #ffffff;
min-width: 60px;
Expand Down Expand Up @@ -505,153 +505,86 @@ body {
background-color: rgb(1, 112, 1);
}

details {
position: relative;
width: 20%;
height: 60px;
filter: drop-shadow(2px 4px 6px #00000044);
min-width: 100px;
}

details[open] {
z-index: 1;
}

summary {
height: 20px;
padding: .7rem;
cursor: pointer;
border-radius: 5px;
margin-top: 14.5px;
background-color: #f1f1f1;
list-style: none;
/* Dropdown Selector */
li a {
text-decoration: none;
color: #2d2f31;
}

summary::-webkit-details-marker {
display: none;
.change-height {
width: 250px;
height: 100%;
background: #d9d9d9;
margin-top: 14px;
margin-left: 5px;
border-radius: 4px;
margin-bottom: 0px;
}

details[open] summary:before {
content: '';
#ss-span {
padding : 11px;
border-radius: 4px;
background : #F46523;
color : white;
font-size : 100%;
cursor : pointer;
display: block;
width: 100vw;
height: 100vh;
background: transparent;
position: fixed;
top: 0;
left: 0;
filter: drop-shadow(4px 6px 10px #00000044);
}

summary:after {
content: '';
display: inline-block;
margin-right: 2px;
margin-top: 3px;
#ss-span::after {
float: right;
width: .5rem;
height: .5rem;
border-bottom: 1px solid currentColor;
border-left: 1px solid currentColor;
border-bottom-left-radius: 2px;
transform: rotate(45deg) translate(50%, 0%);
transform-origin: center center;
transition: transform ease-in-out 100ms;
cursor: pointer;
right: 10%;
content: "+";
}

summary:focus {
outline: none;
}

details[open] summary:after {
transform: rotate(-45deg) translate(0%, 0%);
}

ul {
.slide {
clear: both;
width: 100%;
background: #ddd;
position: absolute;
top: calc(100% + .5rem);
left: 0;
padding: 1rem;
margin: 0;
box-sizing: border-box;
border-radius: 5px;
max-height: 200px;
overflow-y: auto;
}

li {
list-style: none;
height: 0;
overflow: hidden;
text-align: center;
transition: height .4s ease;
padding: 0;
margin: 0;
padding-top: 0rem;
padding: 1rem 0;
border-bottom: 1px solid #ccc;
}

li:first-child {
padding-top: 0;
}

li:last-child {
padding-bottom: 0;
border-bottom: none;
}

summary.radios {
counter-reset: radios;
}

summary.radios:before {
content: var(--selection);
}

input[type=radio] {
counter-increment: radios;
appearance: none;
display: none;

}
.slide li {
list-style-type: none;
padding : 14px;
cursor: pointer;
color: #2d2f31;

input[type=radio]:checked {
border: none;
display: inline;
--display: block;
}

input[type=radio]:after {
content: attr(title);
text-overflow: ellipsis;
display: inline;
font-size: 1rem;
height: 50px;
font-family: 'Raleway', sans-serif;
cursor: pointer;
.slide li:hover {
background-color: #aaaaaa36;
border-radius: 4px;
}

ul.list {
counter-reset: labels;
height: 48px;
background-color: #f1f1f1;
.slide a {
color: #2d2f31;
}

.label-plan {
#touch {
position: absolute;
opacity: 0;
height: 0;
width: 100%;
display: flex;
cursor: pointer;
justify-content: center;
}

}
#touch:checked + .slide {
height: 0;
width: 100%;
max-height: 0;
overflow: scroll;
transition: max-height .4s, height .4s ease, display .4s ease-out;
}


.label-plan span {
--display: none;
display: var(--display);
width: 1rem;
height: 1rem;
border: 1px solid #727272;
border-radius: 3px;
}
#touch:not(:checked) + .slide {
display: none;
transition: max-height .4s, height .4s ease, display .4s ease-out;
}

.delete-plan {
margin-left: 10px;
Expand Down
14 changes: 5 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,11 @@ <h1>
<div class="toggle-features">
<input class="save-plan" id="plan-name" type="text" placeholder="Plan Name">
<button id="save-button"></button>
<details class="custom-select">
<summary class="radios" id="parent-option">
<input type="radio" name="items" id="Select Saved Plans" title="Select Saved Plans" checked>
<!-- Function generates more plans on plan save -->
</summary>
<ul class="list" id="parent-option-2">
<!-- Function generates more plans on plan save -->
</ul>
</details>
<nav class="change-height">
<label for="touch"><span id="ss-span">Select Saved Plan</span></label>
<input type="checkbox" id="touch">
<ul class="slide"></ul>
</nav>
<button id="cc-button"></button>
</div>
<p class="smallFont" style="padding: 1rem 0rem 1rem 0rem; margin-left: 2rem; margin-right: 2rem;">
Expand Down
Loading

0 comments on commit bd5eb37

Please sign in to comment.