Some UX improvements
This commit is contained in:
parent
48c0067076
commit
8c81237501
81 changed files with 791 additions and 151 deletions
65
app/assets/stylesheets/actiontext.css
Normal file
65
app/assets/stylesheets/actiontext.css
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
|
||||
* the trix-editor content (whether displayed or under editing). Feel free to incorporate this
|
||||
* inclusion directly in any other asset bundle and remove this file.
|
||||
*
|
||||
*= require trix
|
||||
*/
|
||||
|
||||
/*
|
||||
* We need to override trix.css’s image gallery styles to accommodate the
|
||||
* <action-text-attachment> element we wrap around attachments. Otherwise,
|
||||
* images in galleries will be squished by the max-width: 33%; rule.
|
||||
*/
|
||||
.trix-content .attachment-gallery > action-text-attachment,
|
||||
.trix-content .attachment-gallery > .attachment {
|
||||
flex: 1 0 33%;
|
||||
padding: 0 0.5em;
|
||||
max-width: 33%;
|
||||
}
|
||||
|
||||
.trix-content .attachment-gallery.attachment-gallery--2 > action-text-attachment,
|
||||
.trix-content .attachment-gallery.attachment-gallery--2 > .attachment, .trix-content .attachment-gallery.attachment-gallery--4 > action-text-attachment,
|
||||
.trix-content .attachment-gallery.attachment-gallery--4 > .attachment {
|
||||
flex-basis: 50%;
|
||||
max-width: 50%;
|
||||
}
|
||||
|
||||
.trix-content action-text-attachment .attachment {
|
||||
padding: 0 !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
|
||||
/* Fix trix dark mode */
|
||||
.trix-button-row {
|
||||
.trix-button-group {
|
||||
border: var(--bs-border-width) solid var(--bs-border-color);
|
||||
|
||||
.trix-button {
|
||||
border: 0;
|
||||
padding: var(--bs-padding)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[data-bs-theme=dark] {
|
||||
.trix-button-row {
|
||||
.trix-button-group {
|
||||
.trix-button {
|
||||
background-color: transparent;
|
||||
filter: invert(100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* end fix trix dark mode */
|
||||
|
||||
.trix-content {
|
||||
pre {
|
||||
background-color: var(--bs-secondary-bg) !important;
|
||||
color: var(--bs-secondary-color) !important;
|
||||
border: var(--bs-border-width) solid var(--bs-border-color) !important;
|
||||
border-radius: var(--bs-border-radius) !important;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue