seneqa
16 November 2024 09:21
1
Operating system
Windows
Joplin version
3.2.1
What issue do you have?
Hello! I used the code in userchrome.css to:
editor and viewer swapped
viewer was bigger than editor
Code:
'''
.rli-editor > div > div > div > div > div > div > div:nth-child(1) {
flex: 1 0 0% !important;
}
.rli-editor > div > div > div > div > div > div > div:nth-child(2) {
flex: 2.2 1 0% !important;
border-left: none !important;
}
.editor-toolbar {
max-width: 100% !important;
}
.rli-editor > div > div > div > div > div > div {
flex-direction: row-reverse !important;
}
'''
But after the update it doesn't work. What should I fix in the code to make it work?
seneqa
16 November 2024 10:11
2
Okay, I figured it out myself. Maybe it will be useful to someone:
#react-root > div.profile-default > div > div.resizableLayoutItem.rli-root > div.resizableLayoutItem.rli-editor > div > div > div > div > div:nth-child(2) > div > div:nth-child(2) > div:nth-child(1) {
flex: 1 0 0% !important;
}
#react-root > div.profile-default > div > div.resizableLayoutItem.rli-root > div.resizableLayoutItem.rli-editor > div > div > div > div > div:nth-child(2) > div > div:nth-child(2) > div:nth-child(2) {
flex: 2.2 1 0% !important;
border-left: none !important;
}
#react-root > div.profile-default > div > div.resizableLayoutItem.rli-root > div.resizableLayoutItem.rli-editor > div > div > div > div > div:nth-child(2) > div > div:nth-child(2) {
flex-direction: row-reverse !important;
}
1 Like
I'm linking to a related pull request that should make the editor/viewer easier to style:
laurent22:dev
← personalizedrefrigerator:pr/desktop/editor-wrapper/prefer-css-to-style
opened 05:55AM - 20 Nov 24 UTC
# Summary
This pull request migrates part of the Markdown editor's styling fr… om `style=`-based styling to SCSS.
**Motivation**: This is motivated in part by the large string of `> div > div > ...`s posted as a solution to [this post on the forum](https://discourse.joplinapp.org/t/the-style-in-userchrome-css-stopped-working-as-it-should/41978/2). Such style sheets are likely to be fragile to changes to the app's structure in the future.
# Screenshots
## CodeMirror 6-based editor



## Legacy editor (CodeMirror 5-based)



1 Like
system
Closed
20 December 2024 05:56
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.