jspaint/styles/themes/classic.css

471 lines
12 KiB
CSS

@import "../../lib/os-gui/windows-98.css";
/* @import "../../lib/os-gui/windows-default.css"; */
/* @import "../../lib/os-gui/peggys-pastels.css"; */
:root {
--theme-loaded: "classic.css";
}
.jspaint {
background: var(--ButtonFace);
}
body,
.canvas-area {
background: var(--AppWorkspace);
}
.canvas-area {
border: 1px inset;
}
.canvas-area > canvas {
background: var(--checker);
/* 16px is a common grid size, but that gives 8px grid cells, and our max zoom is 8x */
/*background-size: 16px;*/
background-size: 8px;
}
@media (resolution: 1x), (resolution: 2x), (min-resolution: 3x) {
* {
image-rendering: -moz-crisp-edges;
image-rendering: crisp-edges;
image-rendering: pixelated;
}
}
.disable-aa-for-things-at-main-canvas-scale .main-canvas,
.disable-aa-for-things-at-main-canvas-scale .selection canvas {
image-rendering: -moz-crisp-edges;
image-rendering: crisp-edges;
image-rendering: pixelated;
}
.selection:after,
.textbox:after {
content: '';
position: absolute;
left: 0px;
top: 0px;
right: 0px;
bottom: 0px;
outline: 1px dashed black;
box-shadow: 0 0 0 1px white;
}
.canvas-area .handle {
background: var(--Hilight);
}
.useless-handle {
background: var(--HilightText); /* @TODO: --ButtonHilight? --Window? */
box-shadow: 1px 1px 0 var(--Hilight) inset;
}
.resize-ghost {
/* this isn't quite the right inversion effect, but I think it's the best I can do;
white makes it invisible over the classic theme's dark gray background;
it's supposed to be lighter over the dark gray background, but I can only make it darker */
outline: 1px dotted #ccc;
mix-blend-mode: difference;
}
.status-area {
font-family: 'Segoe UI', sans-serif;
font-size: 12px;
color: var(--ButtonText);
padding: 3px 2px;
padding-top: 4px;
border-top: 1px solid var(--ButtonShadow);
outline: 1px solid var(--ButtonShadow);
outline-offset: 1px;
}
.text-toolbar-button-group button:not(:first-child) {
margin-left: 0;
}
.text-toolbar-button-group button:not(:last-child) {
margin-right: 0;
}
.tool-options {
border: 1px solid var(--ButtonHilight);
border-top-color: var(--ButtonShadow);
border-left-color: var(--ButtonShadow);
}
.tool {
margin: 0;
padding: 0;
width: 25px;
height: 25px;
border: 0;
border-right: 1px solid var(--ButtonDkShadow);
border-bottom: 1px solid var(--ButtonDkShadow);
background: transparent;
outline: 0;
}
.tool:before {
content: " ";
position: absolute;
z-index: 1;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
border-top: 1px solid var(--ButtonHilight);
border-left: 1px solid var(--ButtonHilight);
border-right: 1px solid var(--ButtonShadow);
border-bottom: 1px solid var(--ButtonShadow);
}
.tool:hover:active {
padding: 1px;
background: transparent !important;
}
.tool:hover:active,
.tool.selected {
padding-bottom: 2px;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
border-top: 1px solid var(--ButtonDkShadow);
border-left: 1px solid var(--ButtonDkShadow);
border-right: 1px solid var(--ButtonHilight);
border-bottom: 1px solid var(--ButtonHilight);
}
.tool:hover:active:before,
.tool.selected:before {
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
border-top: 1px solid var(--ButtonShadow);
border-left: 1px solid var(--ButtonShadow);
border-right: 1px solid var(--ButtonFace);
border-bottom: 1px solid var(--ButtonFace);
}
.tool.selected,
.current-colors {
background: var(--checker);
}
.tools {
height: 200px;
width: 50px;
}
.current-colors {
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.color-selection {
box-sizing: border-box;
-moz-box-sizing: border-box;
border-top: 1px solid var(--ButtonHilight);
border-left: 1px solid var(--ButtonHilight);
border-right: 1px solid var(--ButtonShadow);
border-bottom: 1px solid var(--ButtonShadow);
}
.color-selection:after {
content: '';
position: absolute;
left: 0px;
top: 0px;
right: 0px;
bottom: 0px;
/* @TODO: ButtonAlternateFace? */
border: 1px solid var(--ButtonFace);
}
.current-colors,
.color-button {
border-top: 1px solid var(--ButtonShadow);
border-left: 1px solid var(--ButtonShadow);
/* @TODO: var(--ButtonAlternateFace)? */
border-right: 1px solid var(--ButtonFace);
border-bottom: 1px solid var(--ButtonFace);
/*box-shadow: 1px 1px 0px var(--ButtonDkShadow) inset;*/
}
.swatch:before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.color-selection:before {
left: 1px;
top: 1px;
right: 1px;
bottom: 1px;
}
.color-button:before,
.current-colors:before,
.swatch.pattern:before {
border-left: 1px solid var(--ButtonDkShadow);
border-top: 1px solid var(--ButtonDkShadow);
}
.swatch.pattern:before {
border-right: 1px solid var(--ButtonDkShadow);
border-bottom: 1px solid var(--ButtonDkShadow);
}
.current-colors:after,
.color-button:after {
content: '';
position: absolute;
left: -1px;
top: -1px;
right: -2px;
bottom: -2px;
border-right: 1px solid var(--ButtonHilight);
border-bottom: 1px solid var(--ButtonHilight);
}
.component-ghost.dock {
/* this isn't quite the right inversion effect, but I think it's the best I can do;
white makes it invisible over the classic theme's dark gray background;
it's supposed to be lighter over the dark gray background, but I can only make it darker */
outline: 1px solid #ccc;
mix-blend-mode: difference;
}
.component-ghost:not(.dock) {
outline: 1px dotted #ccc;
mix-blend-mode: difference;
}
.component-ghost:not(.dock):after,
.component-ghost:not(.dock):before,
/* @TODO: thicker resize ghost (4px instead of 3px) */
.resize-ghost.thick:after,
.resize-ghost.thick:before {
content: '';
position: absolute; left: 0; right: 0; top: 0; bottom: 0;
outline: 1px dotted #ccc;
}
.component-ghost:not(.dock):after,
.resize-ghost.thick:after {
outline-offset: 1px;
}
.component-ghost:not(.dock):before,
.resize-ghost.thick:before {
outline-offset: 2px;
}
.tool-window {
background: var(--ButtonFace);
border-top: 1px solid var(--ButtonLight);
border-left: 1px solid var(--ButtonLight);
border-right: 1px solid var(--WindowFrame);
border-bottom: 1px solid var(--WindowFrame);
padding: 2px;
}
.tool-window:after {
content: '';
pointer-events: none;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
border-top: 1px solid var(--ButtonHilight);
border-left: 1px solid var(--ButtonHilight);
border-right: 1px solid var(--ButtonShadow);
border-bottom: 1px solid var(--ButtonShadow);
}
.window > * {
margin: 1px;
}
.tool-window .window-titlebar {
background: var(--ActiveTitle); /* fallback to standard color */
background: -moz-linear-gradient(left, var(--ActiveTitle) 0%, var(--GradientActiveTitle) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%, var(--ActiveTitle)), color-stop(100%, var(--GradientActiveTitle))); /* Chrome, Safari4+ */
background: -webkit-linear-gradient(left, var(--ActiveTitle) 0%, var(--GradientActiveTitle) 100%); /* Chrome10+, Safari5.1+ */
background: -o-linear-gradient(left, var(--ActiveTitle) 0%, var(--GradientActiveTitle) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, var(--ActiveTitle) 0%, var(--GradientActiveTitle) 100%); /* IE10+ */
background: linear-gradient(to right, var(--ActiveTitle) 0%, var(--GradientActiveTitle) 100%); /* W3C */
color: var(--TitleText);
font-family: 'Segoe UI', sans-serif;
font-size: 12px;
height: 15px;
}
.tool-window .window-title {
padding-left: 2px;
}
.tool-window .window-close-button {
width: 13px;
height: 11px;
background-position: 8px 0;
}
.tool-window .window-close-button:hover:active {
background-position: 9px 1px;
}
.tool-window .window-titlebar button {
margin: 2px;
}
.window-content {
font-family: Arial, sans-serif;
font-size: 16px;
color: var(--WindowText);
}
.help-window .item {
font-family: 'Segoe UI', sans-serif;
font-size: 12px;
padding: 0 2px;
position: relative; /* for ::after */
}
.help-window .item:hover {
text-decoration: underline;
color: #0000FF;
cursor: pointer;
}
.help-window li:before {
background-image: url("../../images/help-icons.png");
}
.help-window:not(.focused) .item.selected {
background-color: var(--ButtonFace);
color: var(--ButtonText); /* ?? */
}
.help-window.focused .item.selected {
background-color: var(--Hilight);
color: var(--HilightText);
/* @TODO: separate focus state of the item */
outline: 1px dotted black;
outline-offset: -1px;
}
/* @TODO: separate focus state of the item; while mouse down, the main highlight does not move with the arrow keys but this does, among other differences */
/* .help-window.focused .item.selected::after {
content: "";
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
border: 1px dotted white;
mix-blend-mode: difference;
} */
.history-view {
background: var(--Window);
color: var(--WindowText);
}
input[type=text]:not(.inset-deep),
input[type=url]:not(.inset-deep),
input[type=number]:not(.inset-deep) {
border: 1px solid gray;
}
input[type=text],
input[type=url],
input[type=search],
input[type=number],
select,
input[type=text].inset-deep, /* overriding background */
input[type=url].inset-deep,
input[type=search].inset-deep,
input[type=number].inset-deep,
select.inset-deep {
background-color: var(--Window);
color: var(--WindowText);
/* @TODO: should controls be styled by default, or need .inset-deep or similar? */
/* border-image: var(--inset-deep-border-image); */
}
/* @XXX: using inset-deep to mean "thematic" */
input[type=text].inset-deep,
input[type=url].inset-deep,
input[type=search].inset-deep,
input[type=number].inset-deep,
select.inset-deep {
outline: none;
}
input[type=text]:disabled,
input[type=url]:disabled,
input[type=search]:disabled,
input[type=number]:disabled {
background: var(--ButtonFace);
color: var(--GrayText);
}
input[type=number].no-spinner::-webkit-inner-spin-button,
input[type=number].no-spinner::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type=number].no-spinner {
-moz-appearance: textfield;
}
input:disabled + label {
color: var(--GrayText);
}
/*
Will need a wrapper element or ideally an accessible stylable replacement for the select element for further styling.
Can't use option:hover, or option::after, or select::after, among other things.
*/
/* @XXX: using inset-deep to mean "thematic" */
select.inset-deep {
/* taken from 98.css: https://jdan.github.io/98.css/ */
/* padding-right and background-position are in layout.css for RTL support (@TODO: RTL theme CSS too) */
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0v16h1V1h14V0z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1v14h1V2h12V1H2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H0v-1h15V0h1v17z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1h-1v14H1v1h14V1z' fill='gray'/%3E%3Cpath fill='silver' d='M2 2h12v13H2z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 6H4v1h1v1h1v1h1v1h1V9h1V8h1V7h1V6z' fill='%23000'/%3E%3C/svg%3E");
background-repeat: no-repeat;
border-radius: 0;
box-sizing: border-box;
height: 21px;
outline: none;
}
select.inset-deep:focus:not(:active) {
color: var(--HilightText);
background-color: var(--Hilight);
}
select.inset-deep option {
background-color: var(--Window);
color: var(--WindowText);
}
input:invalid {
box-shadow: 0 0 0 2px red;
}
.partial-url-label {
opacity: 0.6;
}
/* @XXX: using .inset-deep to mean "thematic" */
/* @TODO: show percentage on progress bar, white (HilightText) where it overlaps the Hilight */
progress[value].inset-deep {
display: block;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-color: var(--ButtonFace);
position: relative;
}
progress[value].inset-deep::-webkit-progress-value {
background: var(--Hilight);
}
progress[value].inset-deep::-moz-progress-bar {
background: var(--Hilight);
}
summary {
padding: 0;
}
summary:focus {
outline: 1px dotted var(--ButtonText);
}
summary:hover > span {
text-decoration: underline;
color: #0000FF;
}
summary::marker {
color: var(--ButtonText);
content: "►";
text-decoration: none;
}
details[open] > summary::marker {
color: var(--ButtonText);
content: "▼";
text-decoration: none;
}