ocket8888 commented on a change in pull request #3534: TP Delivery Service
Generate SSL update, new letsencrypt generate and…
URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r334635364
##########
File path: traffic_portal/app/src/common/modules/form/_form.scss
##########
@@ -214,3 +214,64 @@ aside.current-value {
}
+
+/********** true false slider ********/
+.switch {
+ position: relative;
+ display: inline-block;
+ width: 30px;
+ height: 17px;
+}
+
+.switch input {
+ opacity: 0;
+ width: 0;
+ height: 0;
+}
+
+.slider {
+ position: absolute;
+ cursor: pointer;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background-color: #ccc;
+ -webkit-transition: .4s;
+ transition: .4s;
+}
+
+.slider:before {
+ position: absolute;
+ content: "";
+ height: 13px;
+ width: 13px;
+ left: 2px;
+ bottom: 2px;
+ background-color: white;
+ -webkit-transition: .4s;
+ transition: .4s;
+}
+
+input:checked + .slider {
+ background-color: #2196F3;
+}
+
+input:focus + .slider {
+ box-shadow: 0 0 1px #2196F3;
+}
+
+input:checked + .slider:before {
+ -webkit-transform: translateX(13px);
+ -ms-transform: translateX(13px);
+ transform: translateX(13px);
+}
+
+.slider.round {
+ border-radius: 17px;
+}
+
+.slider.round:before {
Review comment:
Same as above RE: `:before` vs `::before`
Also, I'm noticing a lot of repeating selectors. In SCSS you can provide
child selectors like this:
```scss
// top-level selector, equivalent to `.cls` in CSS
.cls {
position: absolute;
// descendant selector, equivalent to `.cls .other` in CSS
// this also inherits its parents' rules; so it has `position: absolute;`
.other {
some: property;
}
// `&` literally inserts the parent selector, so this is equivalent
// to `.cls::before` in CSS
&::before {
// This overrides the inherited value of this property
position: static;
}
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services