feat: add mdeck-* CSS class prefix alongside remark-* (backward compat)#12
Merged
Conversation
For every remark-* CSS selector, add a comma-separated mdeck-* equivalent. The remark-* selectors remain unchanged to ensure full backward compatibility with existing stylesheets and user-defined CSS targeting the old class names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Each element in the containerLayout template now carries both remark-* and mdeck-* class names side by side. Existing code targeting remark-* classes continues to work unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- slideView: dual class names on all created elements (container, scaler, slide, incremental, content, notes, code blocks, code lines, highlighted spans/lines) - slideshowView: dual class names on container element; all classList.toggle/add/remove calls updated for mode classes (presenter, help, blackout, mirrored, pause); getElementsByClassName queries migrated to mdeck-* (both classes are always present) - notesView: getElementsByClassName queries migrated to mdeck-* - slide-number: dual class on slide number element - styler: stylesheet title changed to 'mdeck'; getRemarkStylesheet() falls back to 'remark' title for backward compat - location.ts: classList.contains check updated to mdeck-presenter-mode Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces
mdeck-*CSS class names as the canonical prefix for all elements created by mdeck, while keeping full backward compatibility with existingremark-*selectors.What changed
CSS (
src/styles/mdeck.css)Every
remark-*selector now has a comma-separatedmdeck-*equivalent, so stylesheets targeting either prefix work without changes.HTML template (
src/mdeck/resources.ts)Every element in the container layout now carries both
remark-*andmdeck-*class names.TypeScript
getElementsByClassNamequeries migrated tomdeck-*mdeck-*'mdeck'; lookup falls back to'remark'for backward compatmdeck-presenter-modeBackward compatibility
remark-*class names remain on every element — existing CSS and JS targeting those classes continues to work'mdeck'and'remark'titles