Skip to content

Removed all unnecessary colons in stylus files. #1000

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

Closed
wants to merge 1 commit into from
Closed

Removed all unnecessary colons in stylus files. #1000

wants to merge 1 commit into from

Conversation

Jinjiang
Copy link
Member

// NOTE: Removing the little signal icon for now
// .distance
// position: relative
// position relative
Copy link
Member

Choose a reason for hiding this comment

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

Removed even from comments? 😃

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, they are also stylus codes. Maybe some day they would be enabled again. :-)
(Is that OK?)

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, ofc 👍

@chrisvfritz
Copy link
Contributor

My preference would actually be always colons. 😅 There are some cases in Stylus where the colon is necessary for the value to be parsed correctly, so removing all could actually be dangerous. For me personally, the colons also work better with some of my editor features.

We're also inconsistent in Stylus files between 2 spaces and 4 spaces. I much prefer 2 spaces, if we're already taking a standardization pass

Any thoughts?

@nickmessing
Copy link
Member

@chrisvfritz, I vote for 2 spaces and no colons unless necessary (like javascript semicolons rule) but I moved from stylus to postcss so I guess my opinion is not really worth a lot 😄

@Jinjiang
Copy link
Member Author

I vote for 2 spaces.

For colons or not, I accept any of them but not both of them together. Go all stylus with colons is OK for me if it is much safer and more friendly to editors.

@chrisvfritz
Copy link
Contributor

Then since I'm working with the code the most, let's go on with full colons. 😅

I don't see them as similar to semicolons in JS really, as the contexts in which they're necessary are a bit more complicated and it's not obvious why they're needed, whereas in JS it's much more obvious. Also, auto-completion means I'm never actually typing a colon, while auto-completion in JS will never be able to tell you when you've actually ended a statement. Just my thoughts. 🙂

@nickmessing
Copy link
Member

@chrisvfritz, Totally agree it's not like semicolons, more like rule of "dont't type unless necessary" is similar, but I totally agree that it's your call since you're the main person to work with this codebase, still, it should be enforced and have same code style over entire codebase.

@Jinjiang
Copy link
Member Author

Great. I will create another PR instead of this one to fix colons and spaces in all stylus files.
Thanks.

@Jinjiang Jinjiang closed this Jul 10, 2017
@Jinjiang Jinjiang deleted the removing-stylus-colons branch July 11, 2017 01:50
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.

3 participants