Skip to content
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

feat: add g-md-editor classname to editor dom elem, change default prefix for internal classnames #257

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

d3m1d0v
Copy link
Collaborator

@d3m1d0v d3m1d0v commented Jun 3, 2024

  • changed editor's classname yfm-editor -> g-md-editor
  • added yfm-editor classname to editor in YfmDist extension
  • changed prefix of class name (ye- -> g-md-) when creating class names using helper from src/classname
  • rename css variable: --ye-toolbar-sticky-offset ––> --g-md-toolbar-sticky-offset
  • rename math css variables:
    • --ye-math-back-color ––> --g-md-math-back-color
    • --ye-math-hover-color ––> --g-md-math-hover-color

@d3m1d0v d3m1d0v requested a review from makhnatkin June 3, 2024 09:16
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@@ -3,8 +3,8 @@
$selection-color: rgba(98, 146, 255, 0.2);
$toolbar-height: 28px;

.ye-markup-editor,
.ye-markup-preview {
.g-md-markup-editor,
Copy link
Collaborator

@makhnatkin makhnatkin Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (not blocks):

What is the reasoning behind choosing a class name and what does g- stand for? Is this consistent with the Gravity UI?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, g-md- its short for Gravity Markdown Editor

@@ -1,3 +1,3 @@
.yfm-cut-title .ye-yfm-cut-title-inner {
.yfm-cut-title .g-md-yfm-cut-title-inner {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (not blocks):
.yfm-cut-title is is correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this css selector is correct

@@ -17,7 +17,7 @@ export const YfmDist: ExtensionAuto = (builder) => {
new Plugin({
props: {
attributes: {
class: 'yfm yfm_no-list-reset',
class: 'yfm yfm_no-list-reset yfm-editor',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why here yfm-editor?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for backward compatibility, as some services use this class name to override styles in markdown content in editor

@d3m1d0v d3m1d0v marked this pull request as ready for review June 3, 2024 11:22
@d3m1d0v d3m1d0v merged commit 82b42ce into main Jun 3, 2024
3 checks passed
@d3m1d0v d3m1d0v deleted the rename-styles branch June 3, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants