blockbench/css/general.css
2024-06-06 23:36:15 +02:00

853 lines
17 KiB
CSS

/*Defaults*/
div.tool.wide {
width: 72px;
padding: 1px 0;
}
.hidden, .tooltip_shift, .custom_select ul, .mobile_only, .m_disp {
display: none;
}
div.selection_only {
visibility: hidden;
}
a.open-in-browser {
cursor: pointer;
}
.f_left {
float: left;
}
.f_right {
float: right !important;
}
.i_b {
display: inline-block;
}
label.inline_label {
padding-left: 8px;
padding-right: 8px;
padding-top: 2px;
}
.progress_bar {
background-color: var(--color-back);
height: 20px;
margin-top: 12px;
}
.progress_bar_inner {
background-color: var(--color-accent);
height: 100%;
width: 0px;
}
.accent_color {
color: var(--color-accent);
font-weight: normal;
}
.slash {
color: var(--color-light);
padding-left: 3px;
padding-right: 3px;
font-weight: normal;
display: inline-block;
}
code, .code {
font-family: var(--font-code);
}
.code {
font-size: 16px;
}
.small_text {
font-size: 0.94em;
}
.subtle {
color: var(--color-subtle_text);
}
.color_x {
color: var(--color-axis-x);
}
.color_y {
color: var(--color-axis-y);
}
.color_z {
color: var(--color-axis-z);
}
.button {
display: inline-block;
width: 30px;
text-align: center;
cursor: default;
}
.dark_bordered {
height: 30px;
padding-left: 4px;
padding-top: 1px;
background-color: var(--color-back);
border: 1px solid var(--color-border);
}
.input_wide {
width: 100%;
padding: 8px;
height: 40px;
padding-bottom: 5px;
}
input.medium_width {
width: 64px;
}
.prism-editor-wrapper {
padding-left: 4px;
padding-top: 1px;
background-color: var(--color-back);
border: 1px solid var(--color-border);
}
.prism-editor__autocomplete {
background-color: var(--color-back);
border: 1px solid var(--color-accent);
z-index: 30;
}
.prism-editor__autocomplete li:hover {
color: var(--color-light);
}
.prism-editor__autocomplete li.selected {
background-color: var(--color-accent);
color: var(--color-accent_text);
}
.checkerboard, .checkerboard_trigger .checkerboard_target {
--color-checker_offset: rgba(0, 0, 0, 0.16);
background-color: var(--color-checkerboard) !important;
background-image: linear-gradient(45deg, var(--color-checkerboard) 25%, transparent 25%),
linear-gradient(-45deg, var(--color-checkerboard) 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, var(--color-checkerboard) 75%),
linear-gradient(-45deg, var(--color-checker_offset) 75%, var(--color-checkerboard) 75%);
background-size: 30px 30px;
background-position: 0 0, 0 15px, 15px -15px, -15px 0px;
}
body[mode=start] div#center.checkerboard {
background-image: none;
background-color: var(--color-dark) !important;
}
/*UI Elements*/
div.preview {
height: 100%;
width: 100%;
position: relative;
cursor: inherit;
}
.preview > canvas {
background-repeat: no-repeat;
}
.preview .preview_menu {
position: absolute;
right: -1px;
top: 0;
background-color: var(--color-dark);
display: flex;
}
.checkerboard .preview_menu {
background-color: var(--color-checkerboard);
}
.preview .preview_menu .tool {
width: 32px;
}
.preview .preview_menu .preview_main_menu > i {
width: 20px;
}
.preview .preview_background_menu {
background-size: cover;
width: 30px;
}
.preview > canvas.selectable_cursor {
cursor: copy;
}
.text_padding {
margin-left: 5px;
margin-right: 5px;
}
.toolbar_label {
padding: 2px;
margin-left: 4px;
}
.bar {
height: 30px;
}
.bar > * {
float: left;
}
.bar.flex {
display: flex;
}
.bar.flex > * {
float: none;
}
.bar.flex > label {
flex-grow: 0;
}
.scroll_horizontal {
overflow-x: scroll;
overflow-y: hidden;
height: 100%;
scrollbar-width: none;
}
.scroll_horizontal ::-webkit-scrollbar {
height: 0px;
}
.list {
background-color: var(--color-back);
overflow-y: scroll;
flex-grow: 1;
clear: both;
}
.list::-webkit-scrollbar-track {
background: var(--color-back);
}
ul.list_style li {
list-style: initial;
margin-left: 20px;
}
#quick_message_box {
position: absolute;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
top: 420px;
z-index: 100;
min-width: 150px;
max-width: 250px;
width: fit-content;
padding: 0 12px;
background-color: var(--color-bright_ui);
color: var(--color-bright_ui_text);
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);;
text-align: center;
overflow-wrap: break-word;
cursor: default;
pointer-events: none;
}
@media (max-device-width: 640px) {
#quick_message_box {
bottom: 26px;
top: unset;
padding: 6px;
}
}
#cursor_tooltip {
position: absolute;
z-index: 101;
max-width: 250px;
width: fit-content;
line-height: 18px;
padding: 2px 8px;
margin-top: 10px;
margin-left: 9px;
background-color: var(--color-bright_ui);
color: var(--color-bright_ui_text);
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);;
overflow-wrap: break-word;
white-space: pre-line;
cursor: default;
pointer-events: none;
}
.uv_message_box {
position: absolute;
margin-left: auto;
margin-right: auto;
z-index: 101;
min-width: 100px;
max-width: 200px;
background-color: var(--color-bright_ui);
color: var(--color-bright_ui_text);
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);;
text-align: center;
cursor: default;
top: 40px;
right: 0px;
left: 0px;
pointer-events: none;
}
.selection_rectangle {
position: absolute;
display: block;
border: 1px solid var(--color-accent);
background-color: rgba(40,50,60,0.5);
pointer-events: none;
}
.annotation {
min-width: 40px;
max-width: 100%;
width: max-content;
position: absolute;
text-align: center;
background-color: var(--color-bright_ui);
color: var(--color-bright_ui_text);
padding: 3px 8px;
pointer-events: none;
}
.annotation.transparent {
background: transparent;
font-weight: normal;
font-size: 1.2em;
padding: 0;
margin: -4px;
min-width: 15px;
color: var(--color-light);
text-shadow: 0 0 5px black;
}
.light_on_hover:hover {
color: var(--color-light);
}
.spinning {
-webkit-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
/*Markdown*/
.markdown h1 {
margin: 8px 0 8px 0;
}
.markdown h2 {
margin: 14px 0 8px 0;
}
.markdown p {
margin: 12px 0;
}
.markdown li {
list-style: initial;
cursor: inherit;
margin: 8px 0;
}
.markdown li > p {
margin: 0;
}
.markdown ul {
padding-left: 24px;
}
.markdown ol {
padding-left: 24px;
}
.markdown ol li {
list-style: auto;
}
.markdown a {
cursor: pointer;
}
.markdown pre {
border: 1px solid var(--color-border);
background: var(--color-back);
font-family: var(--font-code);
padding: 6px 10px;
clear: both;
cursor: text;
user-select: text;
-webkit-user-select: text;
}
.markdown pre code {
user-select: text;
-webkit-user-select: text;
}
blockquote {
border-left: 4px solid var(--color-accent);
padding: 4px;
padding-left: 16px;
background: var(--color-back);
}
.markdown table {
border: 1px solid var(--color-border);
background: var(--color-back);
}
.markdown th {
padding: 4px;
}
.markdown td {
padding: 3px 4px;
border-top: 1px solid var(--color-border);
}
.markdown img {
max-width: 100%;
}
/*Actions*/
.toolbar {
width: 100%;
overflow: hidden;
flex-shrink: 0;
}
.toolbar > .content {
display: flex;
flex-wrap: wrap;
}
div.toolbar_wrapper {
float: none;
}
.toolbar_wrapper.narrow > .toolbar {
width: fit-content;
display: flex;
height: 100%;
}
.toolbar_wrapper > .toolbar.no_wrap {
width: fit-content;
display: flex;
flex-flow: row-reverse;
flex-wrap: nowrap;
height: 100%;
}
.toolbar_wrapper > .toolbar.no_wrap > .content {
height: 100%;
overflow: hidden;
flex-grow: 1;
}
.toolbar_wrapper > .toolbar.vertical {
width: 40px;
flex-direction: column-reverse;
}
.toolbar_wrapper > .toolbar.vertical .tool {
height: 36px;
width: 40px;
padding: 2px;
}
.toolbar > .tool.toolbar_menu {
float: right;
width: 12px;
color: var(--color-subtle_text);
}
.toolbar.vertical .toolbar_menu {
height: 24px;
padding: 0;
}
.toolbar > .tool.toolbar_menu > i {
width: 16px;
margin-left: -5px;
font-size: 20px;
}
.toolbar.vertical > .tool.toolbar_menu > i {
width: auto;
margin-right: auto;
margin-left: auto;
}
.toolbar_overflow_popup {
background-color: var(--color-ui);
position: absolute;
display: flex;
flex-wrap: wrap;
max-width: 180px;
z-index: 20;
box-shadow: 0 0px 8px rgba(0, 0, 0, 0.64);
}
.toolbar_overflow_dummy {
height: 30px;
width: 38px;
}
.tool {
height: 30px;
width: 36px;
margin-left: 1px;
margin-right: 1px;
background: transparent;
display: inline-block;
text-align: center;
vertical-align: middle;
cursor: default;
float: left;
color: var(--color-text);
}
.tool i {
display: block;
margin: 4px auto;
}
.tool:active .icon {
padding-top: 1px;
}
.tool:active .icon.fa_big {
padding-top: 2px;
}
img.icon {
height: 26px;
image-rendering: pixelated;
}
.tool.enabled {
border-bottom: 3px solid var(--color-accent);
}
.tool.widget {
width: auto;
padding: 0;
}
.tool.widget.bar_text {
padding: 3px;
}
.tool.has_label {
width: auto;
}
.tool:hover {
color: var(--color-light);
}
.tool.right_tool {
position: relative;
}
.placeholder {
width: 20px;
height: 10px;
float: left;
}
.toolbar .toolbar_separator.border {
width: 2px;
height: 24px;
float: left;
background-color: var(--color-border);
margin: 4px;
margin-bottom: 0;
}
.toolbar .toolbar_separator.spacer {
background: transparent;
flex-grow: 1;
}
.toolbar .toolbar_separator.linebreak {
display: block;
float: left;
width: 100%;
height: 0;
margin: 0;
}
.text_button:hover {
color: var(--color-light);
}
.bar_select_wrapper {
position: relative;
}
.bar_select:hover {
color: var(--color-light);
}
.bar_select select {
padding-right: 24px;
width: 100%;
}
.bar_select .bar_select_wrapper::before {
content: "\f0d7";
font-family: 'Font Awesome 6 Free';
font-weight: 900;
display: block;
position: absolute;
height: 12px;
width: 16px;
pointer-events: none;
right: 6px;
top: 3px;
}
.half {
display: inline-block;
width: calc(50% - 4px);
}
.tooltip {
position: absolute;
height: 28px;
width: fit-content;
padding-left: 5px;
padding-right: 5px;
padding-top: 2px;
background: var(--color-bright_ui);
color: var(--color-bright_ui_text);
margin-top: 30px;
white-space: nowrap;
z-index: 20;
box-shadow: 0 0.4px 3.5px rgba(0, 0, 0, 0.6);
pointer-events: none;
visibility: hidden;
}
.tool:hover > .tooltip {
visibility: visible;
}
.tooltip_shift {
display: none;
}
.tooltip_description {
position: absolute;
background-color: var(--color-ui);
color: var(--color-text);
border: 1px solid var(--color-bright_ui);
padding: 2px 6px;
margin-top: 1px;
font-size: 0.84em;
margin-left: -5px;
opacity: 0;
}
.tool:hover > .tooltip .tooltip_description {
transition-property: opacity;
transition-duration: 200ms;
transition-delay: 600ms;
opacity: 1;
}
.tool.bar_select.icon_mode {
padding: 0 4px;
background-color: var(--color-button);
}
.tool.bar_select .select_option {
float: left;
width: 28px;
height: 100%;
color: var(--color-text);
}
.tool.bar_select .select_option:hover {
color: var(--color-light);
}
.tool.bar_select .select_option.selected {
background: var(--color-accent);
color: var(--color-accent_text);
}
.tool.bar_select .select_option .icon {
transform: scale(0.86);
}
.tool.bar_select .select_option[key=vertex] .icon {
transform: scale(0.6);
}
.tool.side_menu_tool {
width: 48px;
}
.tool.side_menu_tool i.icon {
display: block;
margin-left: 6px;
float: left;
}
.tool.side_menu_tool i.icon.action_more_options {
display: inline-block;
width: 19px;
color: var(--color-text);
margin-left: 0;
}
.tool.side_menu_tool i.icon.action_more_options:hover {
color: inherit;
}
.toolbar.vertical .tool.side_menu_tool {
height: 54px;
}
.toolbar.vertical .tool.side_menu_tool > .action_more_options {
max-width: 48px;
text-align: center;
width: 100%;
margin-top: 0px;
}
/*(Context-)Menu*/
.contextMenu {
position: absolute;
display: block;
height: auto;
width: fit-content;
min-width: 110px;
background-color: var(--color-bright_ui);
color: var(--color-bright_ui_text);
z-index: 30;
box-shadow: 0.4px 0.4px 4px rgba(0, 0, 0, 0.7);
cursor: default;
white-space: nowrap;
}
.contextMenu.sub {
display: none;
margin-top: -4px;
}
.contextMenu.scrollable {
max-height: min(800px, 100vh);
overflow: auto;
}
.contextMenu li {
display: flex;
height: 30px;
padding: 4px;
padding-left: 34px;
padding-right: 8px;
}
.contextMenu li.parent {
padding-right: 20px;
}
.contextMenu li.parent::after {
content: "\f105";
display: block;
font-family: 'Font Awesome 6 Free';
font-weight: 900;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
margin-right: -12px;
margin-left: 6px;
margin-top: -1px;
pointer-events: none;
}
.contextMenu li.enabled {
padding-left: 29px;
border-left: 5px solid var(--color-accent);
}
.contextMenu li.focused,
.contextMenu li.parent.opened {
background-color: var(--color-accent);
color: var(--color-accent_text);
}
.contextMenu li.hybrid_parent.opened {
background-color: transparent;
}
.contextMenu li > i {
margin-top: 1px;
margin-right: 4px;
margin-left: -28px;
pointer-events: none;
}
.contextMenu li > img {
cursor: default;
height: 20px;
width: 20px;
color: var(--color-text);
white-space: nowrap;
margin-bottom: -3px;
margin-left: -27px;
margin-right: 5px;
margin-top: 1px;
}
.contextMenu li > span {
pointer-events: none;
flex: 1 0 auto;
}
.contextMenu li.parent.focused > .contextMenu.sub {
display: block;
}
.contextMenu li.hybrid_parent.opened > .contextMenu.sub {
display: block;
}
.contextMenu li.opened > .contextMenu.sub {
display: block;
}
.contextMenu .menu_more_button {
width: 28px;
margin: -4px -8px -4px 2px;
padding: 4px 0;
text-align: center;
}
.contextMenu .menu_more_button:hover,
.hybrid_parent.opened .menu_more_button {
background-color: var(--color-accent);
color: var(--color-accent_text);
}
.contextMenu .menu_more_button > * {
pointer-events: none;
}
li.menu_separator {
height: 2px;
width: 100%;
padding: 0;
background-color: var(--color-menu_separator);
}
li.menu_separator.has_label {
margin-top: 12px;
margin-bottom: 6px;
}
li.menu_separator.has_label > label {
background-color: var(--color-bright_ui);
color: color-mix(in srgb, var(--color-bright_ui_text) 70%, transparent);
margin-top: -12px;
margin-left: 12px;
padding: 0 5px;
height: 20px;
}
.contextMenu li.highlighted {
animation: menu_item_highlight 1s infinite ease-in-out;
}
@keyframes menu_item_highlight {
0% {
background-color: transparent;
}
50% {
background-color: var(--color-accent);
}
100% {
background-color: transparent;
}
}
.contextMenu .menu_search_bar {
padding: 0;
display: flex;
}
.menu_search_bar > input {
color: inherit;
padding: 6px;
flex-grow: 1;
height: auto;
}
.menu_search_bar > div {
width: 30px;
text-align: center;
padding-top: 2px;
}
.menu_search_bar > div > * {
pointer-events: none;
vertical-align: middle;
}
.keybinding_label {
pointer-events: none;
font-size: 0.84em;
padding: 2px 0 2px 8px;
opacity: 0.6;
flex-grow: 0;
flex-shrink: 0;
}
/* Theme Borders */
body.theme_borders .contextMenu,
body.theme_borders dialog,
body.theme_borders .dialog_close_button,
body.theme_borders #start_screen > content,
body.theme_borders #quick_message_box,
body.theme_borders action_selector > #action_selector_list,
body.theme_borders .plugins_suggested_row > ul > li
{
border: 1px solid var(--color-border);
}
body.theme_borders #start_screen section {
border-bottom: 1px solid var(--color-border);
}
body.theme_borders .panel {
margin-top: -1px;
border-top: 01px solid var(--color-border);
}
body.theme_borders #right_bar {
border-left: 1px solid var(--color-border);
}
body.theme_borders #left_bar {
border-right: 1px solid var(--color-border);
}
body.theme_borders .preview .preview_menu {
right: 0;
}
body.theme_borders .dialog_sidebar {
border-right: 1px solid var(--color-border);
}
body.theme_borders .dialog_handle {
border-bottom: 1px solid var(--color-border);
}
body.theme_borders .dialog_close_button {
right: -1px;
top: -1px;
height: 31px;
}
body.theme_borders li.animation_file {
border-top: 1px solid var(--color-border);
}
body.theme_borders #main_toolbar, body.theme_borders #tab_bar {
border-bottom: 1px solid var(--color-border);
}
body.theme_borders #status_bar {
border-top: 1px solid var(--color-border);
}
body.theme_borders .contextMenu li.menu_separator {
background-color: var(--color-border);
height: 1px;
padding: 0;
opacity: 1;
}
body.theme_borders #animation_controllers_wrapper .controller_state {
border-color: var(--color-border);
}