textarea-pattern-handler
Version:
A TypeScript utility for handling textarea patterns and DOM manipulation
52 lines (46 loc) • 1.02 kB
CSS
.patternBox {
min-height: 100px;
padding: 8px 12px;
border: 1px solid #e0e0e0;
border-radius: 4px;
font-size: 14px;
line-height: 1.5;
color: #333;
background-color: #fff;
transition: border-color 0.2s ease-in-out;
outline: none;
white-space: pre-wrap;
word-wrap: break-word;
}
.patternBox:focus {
border-color: #2196f3;
box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}
.patternBox.placeholderOfTextareaWithPattern {
color: #999;
}
.patternBox .tag {
display: inline-block;
padding: 2px 8px;
margin: 2px 4px;
background-color: #e3f2fd;
border: 1px solid #90caf9;
border-radius: 16px;
color: #1976d2;
font-size: 13px;
cursor: pointer;
transition: all 0.2s ease-in-out;
}
.patternBox .tag:hover {
background-color: #bbdefb;
border-color: #64b5f6;
}
.patternBox .tag::before {
content: "×";
margin-right: 4px;
font-weight: bold;
opacity: 0.7;
}
.patternBox .tag:hover::before {
opacity: 1;
}