pxt-core
Version:
Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors
83 lines (69 loc) • 2.23 kB
text/less
/****************************************************
* Textarea *
****************************************************/
.common-textarea-group {
position: relative;
display: flex;
align-items: stretch;
border-radius: 2px;
border: 1px solid var(--pxt-neutral-stencil1);
background: var(--pxt-neutral-background1);
}
.common-textarea-group:focus::after,
.common-textarea-group:focus-within::after {
content: "";
position: absolute;
inset: -1px;
border: 2px solid var(--pxt-focus-border);
border-radius: 2px;
pointer-events: none;
}
.common-textarea {
width: 100%;
min-width: 0;
padding: 0.5rem;
background-color: var(--pxt-neutral-background2);
color: var(--pxt-neutral-foreground2);
border: none;
outline: 0;
background: none transparent;
text-overflow: ellipsis;
resize: none;
&.resize-both { resize: both; }
&.resize-horizontal { resize: horizontal; }
&.resize-vertical { resize: vertical; }
}
/****************************************************
* Textarea Label *
****************************************************/
.common-textarea-label {
display: block;
font-size: 14px;
font-weight: 600;
padding: 0.3rem 0;
overflow-wrap: break-word;
}
/****************************************************
* Disabled Textarea *
****************************************************/
.common-textarea-wrapper.disabled {
.common-textarea-group {
cursor: default;
border: 1px solid var(--pxt-neutral-background3);
background: var(--pxt-neutral-background3);
}
}
/****************************************************
* High Contrast *
****************************************************/
.high-contrast {
.common-textarea {
color: @highContrastTextColor;
border-color: @highContrastTextColor;
background-color: @highContrastBackgroundColor;
}
.common-textarea-group:focus::after,
.common-textarea-group:focus-within::after {
border-color: @highContrastHighlightColor;
}
}