-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Adds ids and classes for easier CSS/JS selectors #4490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
I'm getting a formatting error, but I'm not sure there's actually a problem. And part of the error relates to existing code that I didn't feel comfortable modifying. |
Try run |
@samglover We should ideally standardize to a specific attribute, such as <div data-classname="header-sidebar"></div> |
I'm not sure I understand why you'd want to add a data attribute instead of just adding ids and classes. Just makes it harder to write selectors for CSS. But it's not my project so feel free to do it the way you'd prefer. I just want to be able to add custom CSS, and currently it's not very easy to do that, so when you invited me to submit a PR, I did. |
@samglover Since memos uses Tailwind, the This is an open-source project, and I think that code maintainability is more important than the the convenience of code for custom styles. |
Fair enough. I just want to be able to actually use the CSS and JS customizations. Right now they're not very useful because it's not possible to reliably target memos or memo content elements. If someone wants to take over this PR and change it to use data attributes instead of ids and classes I can work with that. |
This PR adds ids and classes for easier CSS/JS selectors.
Added ids:
Added classes:
Closes #4481