diff --git a/Password Generator/index.css b/Password Generator/index.css index b8bbf74..0d22990 100644 --- a/Password Generator/index.css +++ b/Password Generator/index.css @@ -1,136 +1,148 @@ -body{ - box-sizing: border-box; - font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; - background-color: #1F2937; +body { + box-sizing: border-box; + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; + background-color: #1F2937; } -.container{ - margin-left: 20%; - margin-right: 10%; +.container { + margin-left: 20%; + margin-right: 10%; } -#headline { - color:#10B981; +#headline1 { + margin-top: 2em; + color: aliceblue; + font-weight: 800; + margin-bottom: 0; + font-size: 2.5rem; } -#btn { - background-color: #10B981; - padding:.7em; - color: white; - font-size: medium; - font-weight: 500; - border: none; - margin-bottom: 1em; - margin-top: 1em; - cursor: pointer; - border-radius:.5rem; +#headline2 { + margin-top: 0em; + margin-bottom: 0; + font-size: 2.5em; + color: #55F991; } -hr{ - color: #273549; - position: absolute; - - width: 30rem; +#line { + color: #D5D4D8; } -#PassContainer{ - border: 2px solid; - margin-top: 1.5em; - margin-right: 2em; - padding-bottom: 2.5rem; - width: 17em; - height: 3em; - line-height: normal; - display: block; - border-radius: .5rem; - background-color: #273549; - color:#000000; -} -.Password1{ - color:#55F991; +#btn { + background-color: #10B981; + padding: 0.7em; + color: white; + font-size: medium; + font-weight: 500; + border: none; + margin-bottom: 1em; + margin-top: 1em; + cursor: pointer; + border-radius: 0.5rem; } -.Password2{ - color:#55F991; + +hr { + color: #273549; + position: absolute; + width: 30rem; } -#headline1{ - margin-top: 2em; - color: aliceblue; - font-weight: 800; - margin-bottom: 0; - font-size: 2.5rem; +.password-container { + display: flex; + gap: 1em; + margin-top: 1em; } -#headline2{ - margin-top: 0em; - margin-bottom: 0; - font-size: 2.5em; - color:#55F991; +.password-box { + border: 2px solid; + padding: 0.5em 1em; + border-radius: 0.5rem; + background-color: #273549; + color: #55F991; + display: flex; + align-items: center; + justify-content: space-between; + width: 16em; +} +.copy-btn { + background-color: #10B981; + border: none; + color: white; + padding: 0.3em 0.6em; + border-radius: 0.3rem; + cursor: pointer; + font-size: 0.9em; } -#line{ - color: #D5D4D8; + +.copy-btn:hover { + opacity: 0.85; } -.password-container{ - display: flex; - +.theme-toggle { + margin-top: 1em; + display: flex; + align-items: center; + gap: 0.5em; } -.switch{ - margin-top: 1em; - margin-left:.5em; - position: relative; - display: inline-block; - width: 60px; - height: 34px; +.switch { + position: relative; + display: inline-block; + width: 60px; + height: 34px; } .switch input { - opacity: 0; - width: 0; - height: 0; + opacity: 0; + width: 0; + height: 0; } -.slider{ - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #273549; - -webkit-transition:.4s; - transition: .4s; +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #273549; + transition: 0.4s; } .slider:before { - position: absolute; - content: ""; - height: 26px; - width: 26px; - left: 4px; - bottom: 4px; - background-color: white; - -webkit-transition: .4s; - transition: .4s; + position: absolute; + content: ""; + height: 26px; + width: 26px; + left: 4px; + bottom: 4px; + background-color: white; + transition: 0.4s; } -input:checked + .slider{ - background-color: #10B981; +input:checked + .slider { + background-color: #10B981; } - input:checked + .slider:before { - -webkit-transform: translateX(26px); - -ms-transform: translateX(26px); - transform: translateX(26px); + transform: translateX(26px); } .slider.round { - border-radius: 34px; + border-radius: 34px; +} + +.slider.round:before { + border-radius: 50%; } -.slider.round:before{ - border-radius: 50%; -} \ No newline at end of file +/* Make label text visible in both themes */ +label { + color: #D5D4D8; /* default for dark mode */ + font-weight: 500; +} + +body.light-mode label { + color: #111827; /* darker text for light mode */ +} diff --git a/Password Generator/index.html b/Password Generator/index.html index 4e75e50..86a1880 100644 --- a/Password Generator/index.html +++ b/Password Generator/index.html @@ -11,20 +11,36 @@
Never use an insecure password
+ + + + +