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

Point frag IDs to #0 instead of just # #18

Open
csswizardry opened this issue Jul 8, 2016 · 3 comments
Open

Point frag IDs to #0 instead of just # #18

csswizardry opened this issue Jul 8, 2016 · 3 comments

Comments

@csswizardry
Copy link

A lot of the links in your demos are pointing to href="#", which has the unwanted (but totally correct) side effect of skipping up to the very top of the page when clicked.

By simply pointing these hrefs to #0 instead, we can remove this behaviour. Because IDs seldom start with a number, we know that id="0" is highly unlikely to appear in our DOM; this means that if we click a link referencing it, nothing will (or can) happen, and we just stay where we are.

Here’s a little demo: https://jsfiddle.net/atwnxo8L/

@jxnblk
Copy link
Member

jxnblk commented Jul 8, 2016

Thanks! Good point. FWIW all the examples live in the READMEs in the basscss/basscss repo.

@csswizardry
Copy link
Author

Gah, my bad. Sorry!

@jxnblk
Copy link
Member

jxnblk commented Jul 9, 2016

Haha, it's fine I just didn't want anyone to futz around with this repo if they submitted a PR

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

No branches or pull requests

2 participants