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

Prepare CSS section for Markdown conversion #2307

Merged
merged 30 commits into from
Sep 17, 2021

Conversation

SphinxKnight
Copy link
Member

@SphinxKnight SphinxKnight commented Sep 3, 2021

  • Remove summary and seoSummary classes
  • Deal with hidden code blocks in live samples
  • Remove hidden div/paragraphs for interactive examples
  • Remove hidden elements that don't contain code blocks in a live sample
  • Remove id attributes except on headings
  • Remove notranslate class
  • Convert/fix note/warning cards
  • Fix broken dd elements
  • Deal with sup and sub
  • Remove nested partial strong in code
  • Deal with <div class="index">
  • Fix live samples that use IDs which are not derived from heading text
  • Remove random CSS classes and unsupported elements
  • Remove links with deki
    (list shamelessly plagiarized from [Markdown] Preparing CSS docs for Markdowning content#5865 )

@SphinxKnight SphinxKnight added the l10n-fr Issues related to French content. label Sep 3, 2021
@SphinxKnight SphinxKnight self-assigned this Sep 3, 2021
@github-actions

This comment has been minimized.

@SphinxKnight
Copy link
Member Author

Note for review: I intentionally left some <sup>s and <sub>s for French typography consistency

@SphinxKnight SphinxKnight marked this pull request as ready for review September 13, 2021 19:48
@SphinxKnight SphinxKnight requested a review from a team as a code owner September 13, 2021 19:48
@SphinxKnight SphinxKnight requested review from tristantheb and removed request for a team September 13, 2021 19:48
@SphinxKnight
Copy link
Member Author

SphinxKnight commented Sep 13, 2021

@tristantheb I'm sorry to inflict this on you :x
I guess checking the conversion report on your side after running yarn run md h2m web/css --locale fr --mode dry and checking a sample of pages should be enough?

N.B. I don't know why there is a dl which is not handled for CSS Counter Styles :/

@wbamberg
Copy link
Contributor

N.B. I don't know why there is a dl which is not handled for CSS Counter Styles :/

There's a bug in the converter where it will fail to convert <dd> elements that have some content (like a list, or a code block) which is not preceded by some text. See mdn/yari#4307 .

In practice, every instance of this that I have seen would be improved by adding some text explaining what the nested list is, or by reworking the markup entirely.

In this case I replaced the whole <dl> with a nested list, which was more consistent with other CSS module pages and seemed to have better semantics (the list of at-rule descriptors do not define the at-rule): https://raw.githubusercontent.com/mdn/content/main/files/en-us/web/css/css_counter_styles/index.md .

@SphinxKnight
Copy link
Member Author

Thanks @wbamberg :) I was looking at the wrong commit on the English side. (fwiw, it's really helpful to look at the state of things at the last commit (before conversion) on the mdn/content repo (to apply similar fixes on French), maybe a git tag would be helpful, I'm not 100% sure)

Here is the conversion report after all this: https://gist.github.com/SphinxKnight/87da8b54884a035e27a2556bd91a33e4

A few notes:

  • <sup>/ <sub> are left for typography (the ones in mathematical expressions where a ^ was acceptable were removed)
  • <i lang="en"> is left as well, again for typography in French.

@tristantheb tristantheb self-assigned this Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-fr Issues related to French content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants