diff options
author | George Claghorn <george@basecamp.com> | 2019-01-04 19:43:11 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2019-01-04 22:22:49 -0500 |
commit | 0decd2ddc4a94cf522fc8ea8e6c73b9deedfdd93 (patch) | |
tree | 91b8ddcf86b15356cd8d3dee235bf53a1778572b /actiontext/lib/templates/actiontext.scss | |
parent | 8a23a0e8c20c0cccf0073906d7dd7f809bfa836d (diff) | |
parent | cfe4674d3637c746cdb3c2b5131e2de498775529 (diff) | |
download | rails-0decd2ddc4a94cf522fc8ea8e6c73b9deedfdd93.tar.gz rails-0decd2ddc4a94cf522fc8ea8e6c73b9deedfdd93.tar.bz2 rails-0decd2ddc4a94cf522fc8ea8e6c73b9deedfdd93.zip |
Import Action Text
Diffstat (limited to 'actiontext/lib/templates/actiontext.scss')
-rw-r--r-- | actiontext/lib/templates/actiontext.scss | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/actiontext/lib/templates/actiontext.scss b/actiontext/lib/templates/actiontext.scss new file mode 100644 index 0000000000..7cb26e74ac --- /dev/null +++ b/actiontext/lib/templates/actiontext.scss @@ -0,0 +1,36 @@ +// +// 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/dist/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, + > .attachment { + flex: 1 0 33%; + padding: 0 0.5em; + max-width: 33%; + } + + &.attachment-gallery--2, + &.attachment-gallery--4 { + > action-text-attachment, + > .attachment { + flex-basis: 50%; + max-width: 50%; + } + } + } + + action-text-attachment { + .attachment { + padding: 0 !important; + max-width: 100% !important; + } + } +} |