this thing implements awesome css+html only multilingual selector together with a…
- User
this thing implements awesome css+html only multilingual selector together with a nightmode switcher by only using pure css and html. format this thing and arrange properly, so it will look awesome and eco-friendly cute as fuck. remove unnecessary properties or elements as you want, but don't ruin functionality.:
.switch-container label:before { content: ""; position: absolute; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 0.3s ease-out; user-select: text; pointer-events: none;
}
.switch-container input[type="checkbox"]:checked ~ label:before { opacity: 1; user-select: text; pointer-events: none; }
body, html { margin: 0; padding: 0; height: 100%; line-height: 1.6; background-color: #f7f7f7; }
header { background-color: #4CAF50; color: #FFF; padding: 16px 0px 0px 0px; text-align: center; position: relative; }
h1, h2, h3, h4, h5, h6 { margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 18px; width: 90%; height: 1%;
}
.left, .right { position: relative; }
.left::before, .right::before { content: ''; position: absolute; top: 50%; border-bottom: 1px dashed #FFF; width: 40%; }
.left::before { right: 100%; margin-right: 20px; }
.right::before { left: 100%; margin-left: 20px; }
.flags-container { position: fixed; top: 0; left: 0; right: 0; --padding: 3px 0; background-color: white; display: flex; justify-content: center; align-items: center; --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); z-index: 1; }
.flag-radio { display: none; }
.flag-label { cursor: pointer; margin: 0 10px; transition: 0.3s; opacity: 0.6; font-size: 24px; }
.flag-label:hover { opacity: 1; }
.language-option { position: run-in; top: 0; left: 0; right: 0; bottom: 0; display: none; justify-content: center; align-items: center; padding-top: 0px; /* language-option container text from top height */ }
#english-flag:checked ~ #english, #hindi-flag:checked ~ #hindi, #hebrew-flag:checked ~ #hebrew, #chinese-flag:checked ~ #chinese, #french-flag:checked ~ #french, #spanish-flag:checked ~ #spanish { display: block; }
- Assistant
- User
remind all available pointer-events:; properties.
- Assistant
The available values for the CSS
pointer-eventsproperty are:-
auto: the default behavior where the element can receive pointer events according to its properties and the general rules of the platform. -
none: the element will not receive any kind of pointer events such as clicking, hovering, or scrolling. -
visiblePainted: the element can receive pointer events only on those areas where its content is visible and painted. -
visibleFill: the element can receive pointer events only on those areas where its background is visible and painted. -
visibleStroke: the element can receive pointer events only on those areas where its border or outline is visible and painted. -
visible: the element can receive pointer events only on those areas where its content, background, border or outline is visible and painted. -
painted: the element can receive pointer events only on those areas where it has been painted.
-