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

Refactor css in shepherd-theme-arrows theme #52

Closed
gitjeff05 opened this issue Mar 17, 2015 · 5 comments
Closed

Refactor css in shepherd-theme-arrows theme #52

gitjeff05 opened this issue Mar 17, 2015 · 5 comments

Comments

@gitjeff05
Copy link

The theme shepherd-theme-arrows has a high level of specificity which makes it really difficult to override styles within another project. For example, if one wants to override the header in a shepherd step, they have to compete with this:

.shepherd-element.shepherd-theme-arrows.shepherd-has-title .shepherd-content header {
    background: #eeeeee;
}

Than means if I want to change the background color, I have to get more specific than that rule above. Then best way might be to add my own class when adding a step:

tour.addStep('guide-step-1', {
    title: "Title for a step",
    text:  "Text for step",
    classes: 'intro-step shepherd-theme-arrows',

and then in my css do this:

intro-step.shepherd-element.shepherd-theme-arrows.shepherd-has-title .shepherd-content header {
    background: #ffffff;
}

There's no reason the initial rule declaration needs to have that high of a specificity. The same affect could be achieved with:

.shepherd-element header {
    background: #eeeeee;
}
@johnbacon
Copy link

+1

@geekjuice
Copy link
Contributor

I've felt the same way for a lot of these tether-based projects which have very high specificity. I believe the original intent was so you create themes like we have in the here. However, I'll take a look at flattening these styles since they are unnecessarily specific.

@natepers
Copy link

+1

1 similar comment
@shaneparsons
Copy link

+1

@alec-chernicki
Copy link

This was definitely an issue for me too. If no one's taken care of this already I'd be more than happy to tackle it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants