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

CRISTAL-450: Code block are not styled #652

Merged
merged 3 commits into from
Feb 7, 2025
Merged

CRISTAL-450: Code block are not styled #652

merged 3 commits into from
Feb 7, 2025

Conversation

tkrieck
Copy link
Collaborator

@tkrieck tkrieck commented Feb 5, 2025

  • Added styles for code blocks

Jira URL

https://jira.xwiki.org/browse/CRISTAL-450

Changes

Description

  • Added affected styles

Clarifications

Screenshots & Video

Before:

Screenshot 2025-02-05 at 09 18 54

After:

Screenshot 2025-02-05 at 09 19 12

Executed Tests

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • N/A

* Added styles for code blocks
*/

/*CODE*/
:deep(.box) {
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI what you propose is only working in view mode, but not in edit mode.
It is important to try to keep them as close as possible from on another, to make things as WYSIWYG as possible.
I suggest to replace you change with the code below in c-article

/*
 * Code block style.
 * TODO: replace with a code macro rendering as soon as we support macro.
 */
:deep(.box .code),
:deep(.doc-content.editor pre) {
  font-family: var(--cr-font-mono);
  background: var(--cr-color-neutral-100);
  border-radius: var(--cr-border-radius-medium);
  padding: var(--cr-spacing-small);
}

* Moved styles to c-article.vue based on the comments on the PR (#652 (comment))
@manuelleduc manuelleduc merged commit 4939927 into main Feb 7, 2025
4 of 5 checks passed
@manuelleduc manuelleduc deleted the CRISTAL-450 branch February 7, 2025 08:39
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.

2 participants