whitebophir/client-data/board.css
Ophir LOJKINE 8eebbe9653
Add a list of predefined colors and shortcuts for them
Color presets (#25)

* Add color presets with keys 0..9

Also, initialize size/thickness with 7.

* Add click-able buttons for color presets

* Refactor color presets: use Minitpl

Use Minitpl for creating the color preset buttons. Also, allow for more
colors than keys and don't use just numeric keys, but allow all
characters.

* Fix layout for case if no color presets are defined

* colors in array, CSS fix, restore random initColor

See: https://github.com/lovasoa/whitebophir/pull/24#issuecomment-608409282

* Remove hardcoded size

* Simplify condition

Co-authored-by: adrian.buerli <adrian.buerli@ims.co.at>
2020-04-03 18:11:32 +02:00

198 lines
3.1 KiB
CSS

html, body, svg {
padding:0;
margin:0;
font-family: Liberation sans, sans-serif;
}
#canvas {
transform-origin: 0 0;
}
#loadingMessage {
font-size: 1.5em;
background: #3339 linear-gradient( #C4DFFF, #8FA2BC);
padding: 20px;
width: 40%;
line-height: 50px;
text-align: center;
border-radius: 10px;
position:fixed;
top: 40%;
left: 30%;
z-index: 1;
box-shadow: 0 0 2px black;
transition: 1s;
}
#loadingMessage.hidden {
opacity: 0;
z-index: -1;
}
#loadingMessage::after {
content: "...";
}
#menu {
font-size: 16px;
border-radius:0;
overflow:hidden;
position:fixed;
left:0;
top:0;
color:black;
height:100%;
transition-duration:1s;
cursor:default;
padding: 10px;
pointer-events: none;
width: 700px;
}
#menu.closed {
border-radius:3px;
left:10px;
top:10px;
background-color:rgba(100,200,255,0.7);
width:6vw;
height:2em;
transition-duration:1s;
}
#menu h2{ /*Menu title ("Menu")*/
display: none;
font-size:4vh;
text-align: center;
letter-spacing:.5vw;
text-shadow: 0px 0px 5px white;
color:black;
padding:0;
margin:0;
}
#menu .tools {
list-style-type:none;
padding:0;
}
#menu .tool {
pointer-events: auto;
white-space: nowrap;
list-style-position:inside;
border:0;
text-decoration:none;
transition-duration:0.5s;
cursor:pointer;
background: linear-gradient( #C4DFFF, #8FA2BC);
margin-top: 10px;
height: 60px;
line-height: 60px;
border-radius: 30px;
max-width: 60px;
transition-duration: .5s;
overflow: hidden;
width: max-content;
box-shadow: inset 0 0 3px #8FA2BC;
}
@keyframes minimize {
to {max-width:100%;}
}
#menu .tool:hover {
color:black;
animation-name: minimize;
animation-duration: 1.2s;
animation-iteration-count: 2;
animation-timing-function: cubic-bezier(.4,.2,.2,1);
animation-direction: alternate;
}
#menu .tool:focus-within,
#menu #settings .tool:hover {
max-width:100%;
}
#menu .tool.curTool {
box-shadow: 0 0 5px #0074D9;
background: linear-gradient(#96E1FF, #36A2FF);
}
#menu .tool-icon {
display: inline-block;
text-align:center;
font-size:24px;
width: 30px;
margin-left: 15px;
margin-right: 26px;
height: 30px;
max-height: 24px;
height: 100%;
margin: 0px 26px auto 15px;
font-family: mono;
}
#menu .tool-icon > * {
display: block;
margin: auto;
}
#menu .tool-name {
text-align: center;
font-size: 25px;
margin-right: 30px;
}
#menu .tool-name.slider {
display: inline-block;
width: 150px;
height: 30px;
font-size: 1.3em;
line-height: 25px;
vertical-align: top;
padding: 6px;
}
input {
font-size:16px;
}
#chooseColor {
width:5vw;
height:100%;
border:1px solid black;
border-radius:3px;
color:black;
text-shadow: 0 0 6px white;
display: block;
width: 100%;
margin: 0;
padding: 0;
}
.colorPresets {
width: 100%;
height: 100%;
display: inline-block;
padding-right: 20px;
vertical-align: middle;
}
.colorPresetButton {
width: 30px;
height: 30px;
border: 1px solid black;
border-radius: 3px;
display: inline-block;
margin-right: 6px;
padding: 0;
vertical-align: text-bottom;
}
.rangeChooser {
display: block;
border: 0;
width: 100%;
margin: 0;
background: transparent;
}