Skip to content

[ImgBot] Optimize images #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 20-custom-range-input/images/Chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 20-custom-range-input/images/Edge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 20-custom-range-input/images/Firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 20-custom-range-input/images/Safari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions 20-custom-range-input/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
CSS - Custom Range Input That Looks Consistent Across All Browsers
</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h2>Custom Range Input That Looks Consistent Across All Browsers!</h2>
</header>
<main class="container">
<h3>Browser Inconsistencies</h3>
<div class="images">
<div class="image">
<figure>
<img src="images/Chrome.png" alt="Chrome" />
<figcaption>Chrome</figcaption>
</figure>
</div>
<div class="image">
<figure>
<img src="images/Firefox.png" alt="Firefox" />
<figcaption>Firefox</figcaption>
</figure>
</div>
<div class="image">
<figure>
<img src="images/Safari.png" alt="Safari" />
<figcaption>Safari</figcaption>
</figure>
</div>
<div class="image">
<figure>
<img src="images/Edge.png" alt="Edge" />
<figcaption>Edge</figcaption>
</figure>
</div>
</div>
</main>
<section>
<h3>Custom range input</h3>
<input type="range" name="custom-range" id="custom-range" />
</section>
</body>
</html>
60 changes: 60 additions & 0 deletions 20-custom-range-input/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap");

*,
::before,
::after {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Lora", serif;
}

body {
display: flex;
flex-direction: column;
align-items: center;
}

header {
margin: 20px 0;
}

img {
width: 200;
height: 200px;
}

.images {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
}

h3 {
text-align: center;
margin-bottom: 20px;
}

figcaption {
text-align: center;
}

input[type="range"] {
-webkit-appearance: none;
appearance: none; /* By giving it the value of none this tells each respective browser to clear out any default styles.
This removes track: this is the part of the horizontal slider that the circular thumb runs along */
background: transparent;
cursor: pointer;
width: 15rem;
background: #053a5f;
height: 0.5rem;
}

input[type="range"]::-webkit-slider-thumb {
appearance: none;
}

input[type="range"]::-moz-range-thumb {
-moz-appearance: none;
appearance: none;
}