Skip to content

Prefix CSS classes, ids and custom properties - #1

Merged
db9795 merged 1 commit into
mainfrom
css-prefix
Oct 1, 2026
Merged

db9795 merged 1 commit into
mainfrom
css-prefix

Conversation

@db9795

@db9795 db9795 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

All classes, the clip path id and the CSS custom properties now start with maptoolkit-elevation-profile-, so generic names like .line, .marker or .section on the host page don't affect the profile.

  • src/ElevationProfile.ts: PREFIX constant and a cls() helper used by the markup, the selectors and sectionValueClass(). The clip path id is now maptoolkit-elevation-profile-clip-N.
  • src/style.css: selectors and custom properties renamed, values unchanged.
  • README (Styling) and tests updated. A new test checks that every rendered class carries the prefix.
  • Changeset minor → 1.1.0.

Custom CSS written against 1.0.0 has to use the new names, e.g. .maptoolkit-elevation-profile-line instead of .line and --maptoolkit-elevation-profile-text instead of --text.

All classes, the clip path id and the CSS custom properties now start with
maptoolkit-elevation-profile-, so generic names like .line, .marker or
.section on the host page don't affect the profile.
@db9795
db9795 merged commit b6924a9 into main Oct 1, 2026
2 checks passed
@db9795
db9795 deleted the css-prefix branch October 5, 2026 13:54
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.

1 participant