Maingron/MainOS

View on GitHub
style.css

Summary

Maintainability
Test Coverage
@import "helper.min.css";
body {
  margin: 0;
  background-color: #853;
  overflow: hidden !important;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

* {
  box-sizing: border-box;
  font-family: var(--font);
}

.content {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.speak {
  display: inline;
  border: 0;
  width: 0;
  height: 0;
  opacity: 0;
}

.autostart {
  display: none !important;
}

.noborder {
  border-radius: 0 !important;
}
.noborder iframe {
  top: 0 !important;
  border: 0 !important;
  background-color: transparent !important;
  border-radius: 0 !important;
}
.noborder .headbar,
.noborder .resizers {
  display: none;
}

#background {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

body.big_buttons .headbar .max,
body.big_buttons .headbar .close,
body.big_buttons .headbar .devreload {
  height: 2rem;
  width: 2rem;
}
body.big_buttons .headbar .max {
  right: calc(2rem - 1px);
}
body.big_buttons .resizer2 {
  height: 20px;
  width: 20px;
  bottom: -11px;
  right: -11px;
}

.program {
  position: absolute;
  display: none;
  min-width: 100px;
  min-height: 50px;
  background-color: transparent;
  border-radius: var(--border-radius);
}
.program:not(.active) .close {
  filter: grayscale(0.4) brightness(1.1);
}
.program.closing {
  transition: 0.3s !important;
  transform: scale(0) !important;
  transform-origin: bottom left;
  opacity: 0.5 !important;
}
.program.fullscreen {
  z-index: 100000 !important;
  top: 0 !important;
  left: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
}
.program.fullscreen iframe {
  top: 0;
  left: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
}
.program.fullscreen .headbar:hover {
  z-index: 2;
  border-bottom: 1px solid #000;
}
.program.fullscreen .headbar:hover .close {
  display: inline-block;
}
.program.fullscreen .headbar:hover .fullscreen {
  transform: scale(1);
}
.program.fullscreen .headbar .max,
.program.fullscreen .headbar .close,
.program.fullscreen .headbar .minimize {
  display: none;
}
.program.fullscreen .headbar .fullscreen {
  transform: scale(0.8);
  right: 2rem;
}
.program.minimized {
  top: 150%;
  left: 150%;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  transform: scale(0);
  opacity: 0;
  z-index: -100;
  visibility: hidden;
}
.program.minimized iframe {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  visibility: hidden;
}
.program.maximized {
  height: calc(100% - 35px);
  width: 100%;
  max-height: 100vh;
  max-width: 100vw;
  border-radius: 0;
}
.program.maximized iframe {
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
}
.program.maximized .resizers {
  display: none;
}
.program.maximized .headbar {
  border-radius: 0;
}
.program.notmaximized {
  height: 50%;
  width: 50%;
}
.program.notmaximized .headbar .drag {
  cursor: grab;
}
.program * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  user-select: none;
}
.program iframe {
  position: absolute;
  border: 0;
  top: 30px;
  left: 0;
  height: calc(100% - 30px);
  width: 100%;
  background-color: #fff;
  overflow: hidden;
  border: 2px solid var(--themecolor);
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}
.program .headbar {
  position: relative;
  top: 0;
  background-color: var(--themecolor);
  height: 30px;
  width: 100%;
  padding-right: 2px;
  border: none;
  overflow: hidden;
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}
.program .headbar * {
  display: inline;
  transition: 0.5s;
}
.program .headbar .drag {
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  display: inline-block !important;
  position: absolute;
  z-index: 0;
}
.program .headbar .max,
.program .headbar .close,
.program .headbar .fullscreen,
.program .headbar .minimize {
  height: 1.9rem;
  width: 1.9rem;
  top: 0;
  border: 0;
  margin: 0;
  padding: 0;
  position: absolute;
  z-index: 1;
  font-size: 1.2rem;
  line-height: 0;
  text-align: center;
  justify-content: center;
  -o-object-fit: contain;
     object-fit: contain;
}
.program .headbar .max img,
.program .headbar .close img,
.program .headbar .fullscreen img,
.program .headbar .minimize img {
  height: 100%;
  width: 100%;
  padding: 20%;
  font-size: 0;
}
.program .headbar .close {
  right: 0;
  background-color: #f00;
}
.program .headbar .max {
  background-color: var(--themecolor2);
  right: 2rem;
}
.program .headbar .minimize {
  background-color: var(--themecolor2);
  right: 4rem;
}
.program .headbar .fullscreen {
  background-color: var(--themecolor2);
  right: 6rem;
}
.program .resizers * {
  height: 10px;
  width: 10px;
  position: absolute;
}
.program .resizers *:active {
  z-index: 9999;
  transition: 0s;
  cursor: se-resize;
}
.program .resizers .resizer2 {
  bottom: -5px;
  right: -5px;
  cursor: se-resize;
  z-index: 20;
}

.start_menu, .start_menu iframe {
  background-color: transparent !important;
}

.box2 {
  position: absolute;
  height: 200px;
  width: 200px;
  top: 400px;
  left: 400px;
}

.progtitle {
  position: relative;
  left: 0;
  top: 5px;
  margin: 5px;
  font-size: 16px;
  height: 16px;
  color: #fff;
}

.progicon {
  position: relative;
  float: left;
  left: 0;
  height: 24px;
  margin: 4px 4px 4px 6px;
  pointer-events: none;
}

#taskbar {
  background-color: var(--themecolor);
  position: absolute;
  display: flex;
  justify-content: space-between;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35px;
  overflow: visible;
  z-index: 99999;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  box-shadow: 0 -1px 0 0px rgba(0, 0, 0, 0.5333333333);
}
#taskbar #start {
  background-color: #4a0;
  position: relative;
  float: left;
  height: 100%;
  width: auto;
  border: none;
  display: flex;
  top: 0;
  left: 0;
  z-index: 999;
  font-size: 1.5em;
  padding: 2px 5px;
  justify-content: left;
  min-width: 36px;
}
#taskbar #start img {
  position: relative;
  display: inline-block;
  height: 100%;
  width: 100%;
  filter: drop-shadow(0 0 1px #000);
  -o-object-fit: contain;
     object-fit: contain;
}
#taskbar #start p {
  position: absolute;
  display: inline;
  bottom: -2px;
  margin: 0;
  padding: 0;
  right: 35px;
  z-index: 999;
  color: #fff;
}
#taskbar #tasklist {
  height: 100%;
  width: 100%;
  position: relative;
  display: flex;
}
#taskbar #tasklist button {
  height: 100%;
  display: inline-flex;
  border: 0;
  background: rgba(119, 119, 119, 0.3333333333);
  padding: 2px 5px;
  margin: 0 2px;
}
#taskbar #tasklist button.active {
  background: rgba(119, 119, 119, 0.8);
  border-bottom: 2px solid var(--themecolor2);
}
#taskbar #tasklist button img {
  height: 100%;
  margin-right: 10px;
}
#taskbar #tasklist button span {
  margin: auto;
  line-height: 1;
}
#taskbar #taskbarright {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  right: 0;
  top: 0;
  height: 100%;
  width: 180px;
  background-color: var(--themecolor2);
  border-left: 2px solid #420;
  max-width: 28%;
  color: #fff;
  min-width: 100px;
}
#taskbar #taskbarright #taskbarrighticons {
  display: inline;
}
#taskbar #taskbarright #taskbarrighticons a {
  display: inline-block;
}
#taskbar #taskbarright img {
  height: 30px;
  margin: 3px;
  width: auto;
}
#taskbar #taskbarright #taskbartime {
  position: relative;
  float: right;
  top: 6px;
  margin: 0;
  margin-left: 7px;
  width: 60px;
  height: 18px;
  font-size: 18px;
  color: #fff;
}
#taskbar #taskbarright .taskbarlanguage {
  position: relative;
  top: 7px;
  margin: 0;
  padding: 1px 3px;
  margin-left: 9px;
  width: 60px;
  height: 18px;
  font-size: 16px;
  color: #fff;
}
#taskbar #taskbarright .show-desktop {
  width: 4px;
  background: var(--themecolor);
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
}

#startmenu {
  display: none;
  z-index: 99999;
}

#icons {
  padding: 15px;
  position: absolute;
  display: flex;
  overflow: visible;
  top: 0;
  left: 0;
  width: auto;
  height: calc(100% - 65px);
  justify-content: flex-start;
  flex-direction: column;
  flex-wrap: wrap;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
#icons button {
  transition: 0.2s;
  position: relative;
  margin: 3px;
  overflow: hidden;
  width: 70px;
  height: 100px;
  display: flex;
  justify-content: start;
  background-color: transparent;
  flex-flow: column;
  border: 0;
  padding: 0;
}
#icons button p {
  color: #fff;
  margin-bottom: 0;
  margin-top: 3px;
}
#icons button:hover, #icons button:focus-visible {
  background-color: var(--hovercolor);
  overflow: visible;
}
#icons img {
  position: relative;
  left: 0;
  top: 0;
  margin: 0;
  padding: 4px;
  box-sizing: border-box;
  display: block;
  height: auto;
  width: inherit;
  -o-object-fit: contain;
     object-fit: contain;
  min-height: 70%;
}
#icons p {
  left: 0;
  top: 70px;
  text-align: center;
  font-size: 0.85em;
  word-wrap: break-word;
  position: absolute;
  display: block;
  width: 100%;
}

.aboutthisversion {
  position: absolute;
  bottom: 40px;
  right: 20px;
  text-align: right;
  font-size: 1.05em;
  line-height: 1.4;
}
.aboutthisversion a {
  color: rgba(255, 255, 255, 0.8);
}

.start_menu {
  overflow: visible !important;
  z-index: 99999999 !important;
}
.start_menu * {
  border: none;
  border-radius: 0;
  overflow: hidden !important;
  z-index: 999999999 !important;
}
.start_menu .headbar {
  display: none;
}
.start_menu iframe {
  top: auto;
  position: absolute;
  bottom: -35px;
  height: calc(100% + 35px);
  background-color: transparent;
}

@media (max-width: 350px) {
  #icons {
    padding: 5px;
    position: absolute;
    display: flex;
    overflow: visible;
    top: 0;
    left: 0;
    width: 90%;
    justify-content: flex-start;
    flex-direction: column;
    flex-wrap: wrap;
  }
  #icons button {
    position: relative;
    margin: 2px;
    overflow: hidden;
    width: 30px;
    height: 30px;
    display: inline-block;
  }
  #icons img {
    height: 30px;
    width: 30px;
  }
  #icons p {
    display: none;
  }
  .program {
    position: absolute;
    display: none;
    min-width: 100px;
    min-height: 40px;
    background-color: transparent;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
  }
  .program.maximized {
    height: calc(100% - 17.5px);
    width: 100%;
  }
  .program iframe {
    transform: scale(0.5, 0.5) translate(-50%, -50%);
    height: calc(200% - 30px);
    width: 200%;
    top: 15px;
  }
  .program .headbar {
    position: relative;
    top: 0;
    background-color: var(--themecolor);
    height: 15px;
    width: 100%;
    padding-right: 1px;
    border: none;
  }
  .program .headbar .max,
  .program .headbar .close {
    height: 12px;
    width: 12px;
    padding: 0;
    top: 0;
    position: absolute;
    font-size: 0;
  }
  .program .headbar .close {
    right: 0;
  }
  .program .headbar .max {
    right: 12px;
  }
  .start_menu iframe {
    height: calc(200% + 36px);
    background-color: transparent;
  }
  #taskbar {
    transform: scale(0.5, 0.5) translate(-50%, 50%);
    width: 200%;
  }
  .progtitle {
    top: -6px;
    margin: 0;
    font-size: 8px;
    height: 8px;
  }
  .progicon {
    height: 13px;
    margin: 1px;
  }
  .aboutthisversion {
    font-size: 0.7em;
    margin: 0;
  }
  #background img {
    width: 25px;
    height: 25px;
    bottom: 25px;
    left: 10px;
  }
}
@media (prefers-color-scheme: dark) {
  .program iframe {
    background-color: var(--black);
  }
}/*# sourceMappingURL=style.css.map */