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

Add code syntax theme to docs #405

Merged
merged 3 commits into from
Jan 4, 2017
Merged

Add code syntax theme to docs #405

merged 3 commits into from
Jan 4, 2017

Conversation

giladgray
Copy link
Contributor

@giladgray giladgray commented Jan 4, 2017

Fixes #98

  • dark and light syntax themes!
  • we've been highlighting this whole time, just not coloring.
  • fix a few language hints on code blocks.

we've been highlighting this whole time, just not coloring. tried to minimize magic in code, but i couldn't help myself a few times.
@blueprint-bot
Copy link

quick-and-dirty syntax theme!

Preview: docs
Coverage: core | datetime

);


@mixin syntax($scopes) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: calling this argument "scopes" is a little confusing; I would just call it "colors" or something

}

&.pseudo-element {
@extend .tag;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be a lint error? we should be using the placeholder-in-extends rule..?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we disabled that nonsense cuz we moved our placeholders to mixins.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why that justifies disabling the rule? If we aren't using placeholders, then there should really be no reason to use @extends at all...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you'll notice i didn't disable the rule here. it's always been like this.

this seems like a valid use of @extend: i want one selector to behave exactly like another, in a very controlled way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

searching for usages of @extend reveals more instances of what i'm doing here: https://github.com/palantir/blueprint/search?utf8=%E2%9C%93&q=extend&type=Code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I know it hasn't been disabled inline, I'm just alarmed that this passed lint because I expected the rule to be enabled across the codebase.

There's a good reason the lint rule is there. Basically every time it's been circumvented has been regretful. But this is in the docs site so I don't mind being lenient about it. Still should be accompanied with a stylelint-disable flag to make it stand out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, now we have an objectively better solution that involves a whopping zero @extends 🛠

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blueprint-bot
Copy link

brace colors, un-bethicken braces, fix one language hint

Preview: docs | table
Coverage: core | datetime

Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found an unrelated bug (#412), but lgtm!

@adidahiya adidahiya changed the title quick-and-pretty syntax theme! Add code syntax theme to docs Jan 4, 2017
@giladgray giladgray merged commit b24ebe3 into master Jan 4, 2017
@giladgray giladgray deleted the gg/syntax branch January 4, 2017 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants