-
Notifications
You must be signed in to change notification settings - Fork 6
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
Conversation
…efix for internal classnames
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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why here yfm-editor?
There was a problem hiding this comment.
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
yfm-editor
->g-md-editor
yfm-editor
classname to editor inYfmDist
extensionye-
->g-md-
) when creating class names using helper fromsrc/classname
--ye-toolbar-sticky-offset
––>--g-md-toolbar-sticky-offset
--ye-math-back-color
––>--g-md-math-back-color
--ye-math-hover-color
––>--g-md-math-hover-color