diff --git a/web/css/dropdown.css b/web/css/dropdown.css new file mode 100644 index 00000000..4db8db92 --- /dev/null +++ b/web/css/dropdown.css @@ -0,0 +1,107 @@ +*{ + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'Poppins', sans-serif; +} + +.container { + width: 100%; + min-height: 100vh; + display: flex; + justify-content: center; + align-items: flex-start; + background-color: var(--bg); +} + +.dropdown { + position: relative; + box-shadow: var(--shadowPreset-3); + border-radius: 1rem; + background: var(--bg); + /* top: 50px; */ + /* left: 45%; */ + margin-top: 10px; + margin-left: 10px; + width: 17rem; + height: 4rem; +} + +.dropdown::before { + content: ""; + position: absolute; + top: 15px; + right: 20px; + z-index: 1000; + width: 8px; + height: 8px; + border: 2px solid #333; + border-top: 2px solid #fff; + border-right: 2px solid #fff; + transform: rotate(-45deg); + transition: 0.2s; + pointer-events: none; +} + +.dropdown.active::before { + top: 22px; + transform: rotate(-225deg); +} + +.dropdown input { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + cursor: pointer; + background: var(--bg); + + + font-size: 1.2em; + border: none; + outline: none; + box-shadow: 0.3rem 0.3rem 0.6rem var(--shadow-1), -0.2rem -0.2rem 0.5rem var(--shadow-2); + padding: 1.2rem 2rem; + border-radius: 1rem; +} + +.dropdown .options { + font-size: 1.2em; + position: relative; + top: 70px; + width: 100%; + background: var(--bg); + overflow: hidden; + display: none; +} + +.dropdown.active .options { + z-index: 9999; + display: block; + + position: relative; + font-family: Arial; + margin-top: 0.5rem; + width: 100%; + height: auto; + + padding: 0.4rem 0.8rem; + border: 0.1rem solid transparent; + cursor: pointer; + border-radius: 1rem; + box-shadow: 0.3rem 0.3rem 0.6rem var(--shadow-1), -0.2rem -0.2rem 0.5rem var(--shadow-2); +} + +.dropdown .options div { + padding: 0.4rem 0.6rem; + border: 0.1rem solid transparent; + cursor: pointer; + border-radius: 0.1rem; + color: var(--textColor-1); +} + +.dropdown .options div:hover { + background: var(--bg-bright); + color: var(--textColor-hover); +} diff --git a/web/css/guide.css b/web/css/guide.css index 5f64fb70..b25343ba 100644 --- a/web/css/guide.css +++ b/web/css/guide.css @@ -14,10 +14,7 @@ body { overflow: hidden; } -.ww, -.us, -.ca, -.uk { +li { margin-bottom: 1rem; justify-self: center; width: auto; diff --git a/web/css/style.css b/web/css/style.css index 909f5972..36299d30 100644 --- a/web/css/style.css +++ b/web/css/style.css @@ -35,10 +35,6 @@ html { height: unset !important; } -.gender-select, -.ethnicity-select, -.religion-select, -.civilstatus-select, .dropdown-select { position: relative; font-family: Arial; @@ -46,19 +42,19 @@ html { width: 17rem; } -.gender-select select, -.ethnicity-select select, -.religion-select select, -.civilstatus-select select, .dropdown-select select { display: none; /*hide original SELECT element:*/ } +.country-select { + margin-top: 0 !important; +} + .select-selected { margin-bottom: 1rem; justify-self: center; - width: 20rem; + width: 17rem; height: 3rem; border-radius: 1rem; box-shadow: var(--shadowPreset-3); @@ -72,7 +68,7 @@ html { position: absolute; content: ""; top: 14px; - right: -3.5rem; + right: 0.5rem; width: 0; height: 0; border: 6px solid transparent; diff --git a/web/dropdowntest.html b/web/dropdowntest.html new file mode 100644 index 00000000..b2165b7b --- /dev/null +++ b/web/dropdowntest.html @@ -0,0 +1,25 @@ + + +
+ + +