sitoctt/Assets/Assets/WM.css

312 lines
7.8 KiB
CSS
Raw Normal View History

2022-08-28 00:21:04 +02:00
/*--------------------------------------------------------*
2022-10-26 00:32:52 +02:00
* Global *
2022-08-28 00:21:04 +02:00
*--------------------------------------------------------*/
:Root {
2022-10-26 00:32:52 +02:00
--RectBlur: 4px;
2022-08-30 00:35:13 +02:00
--WindowMargin: 4px;
--WindowPadding: 8px;
2022-08-29 00:12:31 +02:00
--WindowBorderSize: 4px;
--WindowText: #000000;
/*--WindowLinks: #0000EE;*/
2022-11-11 23:47:02 +01:00
--WindowBackground: RGBA(238,224,255,0.90); /* #EEE0FF */
2022-08-29 15:41:44 +02:00
--TitleBarHeight: 32px;
--TitleBarText: #FFFFFF;
--TitleBarBackground: RGBA(42,10,58,0.90); /* #2A0A3A */
--TaskBarText: #111111;
--TaskBarLinks: #0000EE;
2022-11-11 23:47:02 +01:00
--TaskBarBackground: RGBA(204,170,221,0.85); /* #CCAADD */
2022-08-28 00:21:04 +02:00
--TaskBarHeight: 36px;
}
2023-01-29 20:36:18 +01:00
* { Box-Sizing: Border-Box; }
2022-08-28 00:21:04 +02:00
Body {
Margin: 0;
Padding: 0;
Overflow: Hidden;
Overflow-Wrap: Break-Word;
2022-08-29 15:41:44 +02:00
}
/*--------------------------------------------------------*/
2022-08-28 00:21:04 +02:00
/*--------------------------------------------------------*
* Window Manager *
*--------------------------------------------------------*/
.Window {
Position: Absolute;
2022-08-30 00:35:13 +02:00
Margin: Var(--WindowMargin);
2022-08-29 00:12:31 +02:00
Border: Solid Var(--WindowBorderSize) Var(--TitleBarBackground);
Color: Var(--WindowText);
Background: Var(--WindowBackground);
Backdrop-Filter: Blur(Var(--RectBlur));
2022-08-28 00:21:04 +02:00
}
.WindowContent {
2022-08-30 00:35:13 +02:00
Min-Width: Calc(100% + Var(--WindowMargin)*2 + Var(--WindowBorderSize)*2);
2022-08-29 15:41:44 +02:00
Padding: Calc(Var(--WindowPadding)*2);
2022-10-30 00:44:03 +02:00
Padding-Top: Var(--WindowPadding);
2022-08-28 00:21:04 +02:00
Overflow-Y: Auto;
2022-08-30 00:35:13 +02:00
Margin-Left: Calc(0px - Var(--WindowMargin) - Var(--WindowBorderSize));
2022-08-29 00:12:31 +02:00
Margin-Top: Var(--WindowBorderSize);
Color: Var(--WindowText);
Background: Var(--WindowBackground);
Backdrop-Filter: Blur(Var(--RectBlur));
2022-08-29 00:12:31 +02:00
Border: Solid Var(--WindowBorderSize) Var(--TitleBarBackground);
2022-08-28 00:21:04 +02:00
}
2023-01-29 20:36:18 +01:00
.Window:Hover { Z-Index: 192 !Important; }
.Window A, .WindowContent A { /*Color: Var(--WindowLinks);*/ }
2022-08-28 00:21:04 +02:00
.TitleBar {
2022-08-30 00:35:13 +02:00
Padding: Var(--WindowMargin);
Color: Var(--TitleBarText);
Background: Var(--TitleBarBackground);
Backdrop-Filter: Blur(Var(--RectBlur));
2022-08-28 00:21:04 +02:00
Vertical-Align: Top;
Max-Height: Var(--TitleBarHeight);
}
2023-01-29 20:36:18 +01:00
.TitleBarContent { Text-Align: Center; }
.TitleBarContent > Span:Nth-Child(1) { Float: Left; }
.TitleBarContent > Span:Nth-Child(3) { Float: Right; }
2022-08-28 00:21:04 +02:00
.TaskBar {
Width: 100%;
Color: Var(--TaskBarText);
Background: Var(--TaskBarBackground);
Backdrop-Filter: Blur(Var(--RectBlur));
2022-08-28 00:21:04 +02:00
Position: Fixed;
Bottom: 0px;
2022-08-30 00:35:13 +02:00
Padding: Var(--WindowMargin);
Min-Height: Var(--TaskBarHeight);
2022-08-28 00:21:04 +02:00
Max-Height: Var(--TaskBarHeight);
Z-Index: 256;
}
2023-01-29 20:36:18 +01:00
.TaskBar > Details { Z-Index: 296; }
.TaskBar > Details > Summary { Width: Max-Content; }
.TaskBar > Details > Div {
Position: Fixed;
Left: 0px;
Bottom: Var(--TaskBarHeight);
2022-08-29 15:41:44 +02:00
Padding: Calc(Var(--WindowPadding)*2);
Color: Var(--TaskBarText);
Background: Var(--TaskBarBackground);
Backdrop-Filter: Blur(Var(--RectBlur));
2022-08-29 15:41:44 +02:00
Max-Height: Calc(90vh - Var(--TaskBarHeight));
Overflow-Y: Scroll;
}
2023-01-29 20:36:18 +01:00
.TaskBarMenu { Font-Size: Larger; }
.TaskBarMenu A { Color: Var(--TaskBarLinks) !Important; }
2022-08-28 00:21:04 +02:00
.MenuButton {
Display: Inline-Block;
Height: 100%;
2022-08-28 00:21:04 +02:00
}
.TaskBarRight {
Position: Absolute;
Bottom: 0;
Right: Calc(Var(--TaskBarHeight) - 4px); /* Accomodate show desktop icon */
Height: Calc(Var(--TaskBarHeight) / 6 * 5); /* Try to vertically center the text lol */
}
2022-08-28 00:21:04 +02:00
2022-12-11 00:41:46 +01:00
/*--- "Shade Window" button --------------------------*/
2022-08-29 15:41:44 +02:00
.CheckToggle {
2022-08-29 00:12:31 +02:00
Position: Fixed;
Opacity: 0;
/*Visibility: Hidden;*/
2022-08-29 00:12:31 +02:00
}
2023-01-29 20:36:18 +01:00
.CheckLabel:Before { Content: '🔼'; }
2022-08-29 15:41:44 +02:00
:Checked ~ .TitleBarContent > Span > .CheckLabel:Before {
Content: '🔽';
2022-08-29 00:12:31 +02:00
}
:Checked ~ .ToggleBox {
Display: None;
Visibility: Hidden;
}
2022-08-29 15:41:44 +02:00
/**** -------------------------------------------- ****/
.Absolute-, .Absolute- {
Position: Absolute;
Bottom: 0px;
Left: 0px;
}
2022-08-29 15:41:44 +02:00
/*--------------------------------------------------------*/
/*--------------------------------------------------------*
2022-10-26 00:32:52 +02:00
* Mixed fried - Should be ordered *
2022-08-29 15:41:44 +02:00
*--------------------------------------------------------*/
2022-08-29 00:12:31 +02:00
/* No selection */
2022-08-29 15:41:44 +02:00
.TitleBarContent,
.TaskBar,
#Desktop,
#TitlesWindow, #FeedWindow,
#DesktopCheck, #DesktopCheck ~ Label {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
User-Select: none;
2022-08-28 00:21:04 +02:00
}
#MainWindow {
Max-Width: 85vw;
2022-10-30 00:44:03 +02:00
Max-Height: Calc(90vh - 24px);
2023-01-29 20:36:18 +01:00
Top: Calc(/*24px*/56px + Var(--TitleBarHeight));
Right: 12px;
Z-Index: 20;
2022-08-28 00:21:04 +02:00
}
2022-08-29 15:41:44 +02:00
#MainWindow .WindowContent {
2023-01-29 20:36:18 +01:00
Max-Height: Calc(90vh - /*24px*/56px - (Var(--TitleBarHeight) * 2) - Var(--WindowMargin));
2022-08-28 00:21:04 +02:00
}
#TitlesWindow {
Max-Width: 60vw;
Max-Height: 60vh;
2022-11-11 23:47:02 +01:00
Top: Calc(8px + 6vh + (Var(--TitleBarHeight)*2));
Left: 12px;
Z-Index: 12;
2022-08-28 00:21:04 +02:00
}
2022-08-29 15:41:44 +02:00
#TitlesWindow .WindowContent {
Max-Height: Calc(60vh - (Var(--TitleBarHeight) * 2) - Var(--WindowMargin));
}
#FeedWindow {
Max-Width: 75vw;
Max-Height: 40vh;
Top: 8px;
2022-11-11 23:47:02 +01:00
Left: Calc(8px + 3vw);
Z-Index: 8;
}
#FeedWindow .WindowContent {
Max-Height: Calc(40vh - (Var(--TitleBarHeight) * 2) - Var(--WindowMargin));
2022-08-30 00:35:13 +02:00
}
:Where(#FeedWindow, #TitlesWindow .WindowContent, .TaskBarMenu) Ul Li {
2022-08-30 00:35:13 +02:00
List-Style-Type: None !Important;
2022-08-28 00:21:04 +02:00
}
:Where(#FeedWindow, #TitlesWindow, .TaskBarMenu) Ul {
2022-10-26 00:32:52 +02:00
Padding-Top: 0px;
Padding-Left: 8px;
Padding-Right: 4px;
}
/* Tared for a reasonably-256x32 image */
#CountWindow {
2022-10-30 00:44:03 +02:00
/*Max-Width: Calc(256px + 8px);*/
Max-Height: Calc(32px + 8px + Var(--TitleBarHeight));
Bottom: Calc(8px + 32px + 8px + Var(--TitleBarHeight) + Var(--TaskBarHeight));
Left: 8px;
Z-Index: 4;
}
#CountWindow .WindowContent {
Padding: 0px;
Min-Height: Calc(32px + 8px);
Max-Height: Calc(32px + 8px);
Overflow: Hidden;
2022-10-30 00:44:03 +02:00
Text-Align: Center;
}
#CountWindow .WindowContent Img {
Width: 100%;
/*
Margin-Left: -4px;
Margin-Right: -4px;
*/
2022-10-26 00:32:52 +02:00
}
2022-08-28 00:21:04 +02:00
/* Tared for a 88x31 buttons and everything less tall */
#SlideWindow {
Max-Width: 50vw;
Min-Height: Calc(32px + 8px);
Max-Height: Calc(31px + 8px + Var(--TitleBarHeight));
Bottom: Calc(8px + Var(--TaskBarHeight) + 31px);
Left: Calc(8px + 2vw);
Z-Index: 16;
}
#SlideWindow .WindowContent {
Max-Height: Calc(31px + 8px);
Padding: 0px;
Overflow: Hidden;
}
#Desktop {
Position: Absolute;
Top: 0px;
Left: 0px;
Width: 100vw;
Height: 100vh;
}
#DesktopButtons {
Bottom: Calc(Var(--TaskBarHeight) + Var(--WindowMargin));
Left: Calc(Var(--WindowMargin) * 2);
}
2023-01-29 20:36:18 +01:00
#DesktopButtons:Hover { Z-Index: 192 !Important; }
2022-12-11 00:41:46 +01:00
/*--- "Show Desktop" feature -------------------------*/
#DesktopCheck {
/* -4px to leave a bit of padding */
Width: Calc(Var(--TaskBarHeight) - 4px);
Height: Calc(Var(--TaskBarHeight) - 4px);
}
2023-01-29 20:36:18 +01:00
#DesktopCheck ~ Label { Height: Var(--TaskBarHeight); }
#DesktopCheck, #DesktopCheck ~ Label {
Position: Absolute;
Bottom: 0 !Important;
Right: 0px;
Z-Index: 320 !Important;
/* Emoji is taller than normal letters, so make it smaller */
Font-Size: Calc(Var(--TaskBarHeight) - 8px);
Line-Height: Var(--TaskBarHeight);
}
#DesktopCheck ~ Label > Span {
Display: Inline-Block;
/* To get PERFECT vertical align */
/*Padding-Bottom: 4px;
Line-Height: Calc(Var(--TaskBarHeight) - 2px);*/
}
#DesktopCheck:Checked ~ Label > Span {
Background-Color: Var(--TitleBarBackground);
}
#DesktopCheck:Checked ~ :Where(.Window, * > .Window) {
Display: None;
Visibility: Hidden;
}
2022-12-11 00:41:46 +01:00
/**** -------------------------------------------- ****/
/*--- Draggable windows ------------------------------*/
/* Currently broken if we have multiple windows,
due to the resizable div area covering the top left part of the screen.
Applying a transformation of scaleY(-1) translateY(100%) fixes it vertically
but dragging the window around the screen is flipped.
How the f do I make this work?
*/
.DragContainer {
Position: Absolute;
Display: Inline-Block;
}
.DragBox {
Position: Relative;
Width: 20px;
Height: 20px;
Resize: Both;
Overflow: Scroll;
Z-Index: 1024;
}
.DragContainer > .Window {
Top: Initial !Important;
Margin-Top: -24px;
Margin-Right: -24px;
}
/**** -------------------------------------------- ****/
/*--------------------------------------------------------*/