Improve QWord ribbon fidelity

This commit is contained in:
Курнат Андрей
2026-06-01 23:29:28 +03:00
parent c8c1be7a30
commit 464484bb19
2 changed files with 502 additions and 98 deletions
+236
View File
@@ -327,6 +327,242 @@ button {
background: rgba(255, 255, 255, 0.96);
}
.word-module-toolbar {
display: block;
min-height: 118px;
padding: 0;
overflow: hidden;
}
.word-ribbon {
display: flex;
align-items: stretch;
width: 100%;
min-width: 100%;
min-height: 118px;
overflow: hidden;
background: #ffffff;
}
.word-ribbon-group {
display: grid;
grid-template-rows: minmax(0, 1fr) 18px;
align-items: stretch;
gap: 4px;
min-height: 118px;
min-width: 0;
padding: 8px 10px 4px;
border-right: 1px solid #d6dde8;
}
.word-ribbon-title {
align-self: end;
color: #69778a;
font-size: 11px;
line-height: 1;
text-align: center;
}
.word-command-row,
.word-select-row,
.word-color-row {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.word-file-group {
flex: 0 0 76px;
grid-template-columns: minmax(0, 1fr);
}
.word-file-actions {
display: grid;
grid-template-columns: repeat(2, 28px);
align-content: start;
justify-content: center;
gap: 6px;
}
.word-icon-command {
display: grid;
place-items: center;
width: 28px;
height: 28px;
border: 1px solid transparent;
border-radius: 4px;
background: #ffffff;
color: var(--text);
cursor: pointer;
}
.word-icon-command:hover {
border-color: #c7d8eb;
background: #edf6ff;
}
.word-clipboard-group {
flex: 0 0 150px;
grid-template-columns: auto auto;
}
.word-clipboard-group .word-ribbon-title,
.word-font-group .word-ribbon-title,
.word-paragraph-group .word-ribbon-title,
.word-styles-group .word-ribbon-title,
.word-insert-group .word-ribbon-title,
.word-edit-group .word-ribbon-title {
grid-column: 1 / -1;
}
.word-large-command {
display: grid;
place-items: center;
align-content: center;
gap: 4px;
min-width: 66px;
min-height: 70px;
border: 1px solid transparent;
border-radius: 4px;
background: #ffffff;
color: var(--text);
cursor: pointer;
font-size: 12px;
}
.word-large-command:hover,
.word-command-stack button:hover,
.word-style-gallery button:hover {
border-color: #c7d8eb;
background: #edf6ff;
}
.word-command-stack {
display: grid;
align-content: start;
gap: 4px;
}
.word-command-stack button {
display: inline-flex;
align-items: center;
gap: 6px;
min-height: 22px;
border: 1px solid transparent;
border-radius: 4px;
background: #ffffff;
color: var(--text);
cursor: pointer;
font-size: 12px;
white-space: nowrap;
}
.word-font-group {
flex: 1 1 266px;
grid-template-columns: minmax(0, 1fr);
}
.word-font-select {
min-width: 0;
flex: 1 1 170px;
}
.word-font-size-select {
flex: 0 0 64px;
width: 64px;
}
.word-format-tools {
width: fit-content;
max-width: 100%;
margin-top: 6px;
}
.word-color-row {
flex-wrap: wrap;
margin-top: 6px;
}
.word-color-row .text-color-tools {
min-height: 26px;
padding-left: 0;
border-left: 0;
}
.word-color-row .color-swatch {
width: 18px;
height: 18px;
}
.word-paragraph-group {
flex: 0 0 170px;
grid-template-columns: minmax(0, 1fr);
}
.word-paragraph-group > .segmented-tools,
.word-paragraph-group > .compact-command {
align-self: start;
}
.word-paragraph-group .compact-command {
width: 100%;
}
.word-styles-group {
flex: 0 1 210px;
grid-template-columns: minmax(0, 1fr);
}
.word-style-gallery {
display: grid;
grid-template-columns: repeat(2, minmax(74px, 1fr));
gap: 6px;
min-width: 0;
}
.word-style-gallery button {
display: grid;
align-content: center;
min-height: 64px;
padding: 6px 8px;
border: 1px solid #d6dde8;
border-radius: 4px;
background: #ffffff;
color: #334155;
cursor: pointer;
font-size: 12px;
text-align: left;
}
.word-style-gallery button span {
color: #1e5fa7;
font-size: 20px;
line-height: 1.1;
}
.word-insert-group {
flex: 0 0 96px;
grid-template-columns: minmax(0, 1fr);
}
.word-insert-group .compact-command,
.word-edit-group .compact-command {
justify-content: flex-start;
}
.word-edit-group {
flex: 0 0 132px;
grid-template-columns: minmax(0, 1fr);
}
.word-edit-group .toolbar-status {
min-height: 26px;
padding: 0;
border-left: 0;
font-size: 11px;
}
.hidden-file-input {
display: none;
}