mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 12:07:59 +00:00
edit css for csv tables to have two themes
This commit is contained in:
@@ -1,27 +1,57 @@
|
|||||||
:root {
|
:root {
|
||||||
color-scheme: dark;
|
--font-family: Arial, sans-serif;
|
||||||
|
--margin-small: 0.625rem;
|
||||||
|
--margin-medium: 1.25rem;
|
||||||
|
--margin-large: 2.5rem;
|
||||||
|
--padding-small: 0.125rem;
|
||||||
|
--padding-medium: 1rem;
|
||||||
|
--font-size-large: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
:root.dark {
|
||||||
|
--bg-color: #252525;
|
||||||
|
--text-color: #e0e0e0;
|
||||||
|
--nav-bg-color: #121212;
|
||||||
|
--nav-border-color: #25682a;
|
||||||
|
--nav-link-color: #fff;
|
||||||
|
--nav-link-hover-color: #3fb449;
|
||||||
|
--warning-color: #FFDB8F;
|
||||||
|
}
|
||||||
|
|
||||||
|
:root.light {
|
||||||
|
--bg-color: #ffffff;
|
||||||
|
--text-color: #000000;
|
||||||
|
--nav-bg-color: #f8f8f8;
|
||||||
|
--nav-border-color: #cccccc;
|
||||||
|
--nav-link-color: #000000;
|
||||||
|
--nav-link-hover-color: #38a63d;
|
||||||
|
--warning-color: #FF4500;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: var(--base-font-size);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #252525;
|
background-color: var(--bg-color);
|
||||||
color: #e0e0e0;
|
color: var(--text-color);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: Arial, sans-serif;
|
font-family: var(--font-family);
|
||||||
}
|
}
|
||||||
|
|
||||||
#container {
|
#container {
|
||||||
margin-top: 20px;
|
margin-top: var(--margin-medium);
|
||||||
margin-left: 10px;
|
margin-left: var(--margin-small);
|
||||||
margin-right: 10px;
|
margin-right: var(--margin-small);
|
||||||
margin-bottom: 20px
|
margin-bottom: var(--margin-medium);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-container {
|
.table-container {
|
||||||
margin-bottom: 40px;
|
margin-bottom: var(--margin-large);
|
||||||
}
|
}
|
||||||
|
|
||||||
.csv-table {
|
.csv-table {
|
||||||
margin-top: 10px;
|
margin-top: var(--margin-small);
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
@@ -29,48 +59,59 @@ h3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
background-color: #121212;
|
background-color: var(--nav-bg-color);
|
||||||
padding: 1em 0;
|
padding: var(--padding-medium) 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-bottom: 2px solid #25682a;
|
border-bottom: 2px solid var(--nav-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
nav .logo {
|
nav .logo {
|
||||||
margin-left: 40px;
|
margin-left: var(--margin-large);
|
||||||
height: 40px;
|
height: 2.5rem;
|
||||||
/* Adjust height as needed */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nav ul {
|
nav ul {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-left: 1px;
|
margin-left: 0.0625rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav ul li {
|
nav ul li {
|
||||||
margin-right: 50px;
|
margin-right: 3.125rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav ul li a {
|
nav ul li a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #fff;
|
color: var(--nav-link-color);
|
||||||
font-size: 1.2em;
|
font-size: var(--font-size-large);
|
||||||
}
|
}
|
||||||
|
|
||||||
nav ul li a:hover,
|
nav ul li a:hover,
|
||||||
nav ul li a.active {
|
nav ul li a.active {
|
||||||
color: #3fb449;
|
color: var(--nav-link-hover-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.warning {
|
.warning {
|
||||||
color: #FFDB8F;
|
color: var(--warning-color);
|
||||||
margin-bottom: 10px;
|
margin-bottom: var(--margin-small);
|
||||||
padding: 2px;
|
padding: var(--padding-small);
|
||||||
display: none;
|
display: none;
|
||||||
/* Initially hidden */
|
}
|
||||||
|
|
||||||
|
/* ------------ Overwriting Tabulator CSS rules ------------ */
|
||||||
|
|
||||||
|
:root.light .tabulator-header,
|
||||||
|
:root.light .tabulator .tabulator-header .tabulator-col {
|
||||||
|
background: var(--nav-bg-color) !important;
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
:root.light .tabulator {
|
||||||
|
border-top: 1px solid #222;
|
||||||
|
border-bottom: 2px solid #222;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en" class="dark">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
|||||||
Reference in New Issue
Block a user