pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
618 stars 321 forks source link

Unprefixed IDs #1417

Open gabalafou opened 1 year ago

gabalafou commented 1 year ago

Without prefixes for names that live in a global namespace, it's so, so easy to end up with name clashes. What if someone uses this theme but one of their pages loads a third-party JavaScript widget that has its own version switcher button with the same versionswitcherbutton id?

_Originally posted by @gabalafou in https://github.com/pydata/pydata-sphinx-theme/pull/1414#discussion_r1298493286_

trallard commented 1 year ago

I am +1 on moving to a pattern where we prefix our own ids with pst_ the same way we do for example with CSS variables

12rambau commented 1 year ago

I'm +1 as well, I don't know what is the convention for prefixes in the javascripts community, camel case or snake case ?