Skip to content

Conversation

neromaki
Copy link
Contributor

Adding a box-shadow property as I keep having to Google the parameter order, bonus that this also addresses one of the three support issues #18

Default parameter outputs put a Material Design-style card shadow emphasising the container "floating".

Also outputs a comment at the end of the line with the parameters for reference.

@neromaki
Copy link
Contributor Author

neromaki commented Jul 29, 2016

Also addressed #17 by removing the trailing '$0' at the end of snippets; tested on latest Atom with no issues

@neromaki
Copy link
Contributor Author

Aaand just addressed #19 by adding max-width and max-height!

@neromaki neromaki changed the title Adding box-shadow property Adding box-shadow property, removing '$0' and adding max-(width/height) Jul 29, 2016
'body': 'bottom: ${1:0}$0'
'body': 'bottom: ${1:0}'
'box-shadow':
'prefix': 'boxs'
Copy link
Owner

Choose a reason for hiding this comment

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

How about bs for the prefix. It makes it consistent with the other prefixes:

  • When the rule is multiple words, I use the first letter from each word.
  • When the rule is one word, I use the first 3 letters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aah okay, good to be consistent!
Do you have any thoughts on aliases? (such as boxs in this instance)

Copy link
Owner

Choose a reason for hiding this comment

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

I'll have to think about the alias. I'm worried about taking over too many prefixes. Can you add it as a separate PR after this one is merged?

Btw, I have some more aliases that I want to add, like one for box:

'box':
  'prefix': 'box'
  'body': """
    position: ${1:absolute};
    top: ${2:0};
    right: ${3:0};
    bottom: ${4:0};
    left: ${5:0};
    content: '';$0
  """

It's probably not the best prefix name, but it is what I came up with at the time.

@dsandstrom
Copy link
Owner

Awesome work. I added some inline comments.

…consistent, and changing the (min/max)-(width/height) prefixes for clarity
@neromaki
Copy link
Contributor Author

neromaki commented Aug 3, 2016

Have committed some adjustments based on your feedback!

'prefix': 'bs'
'body': """
// h-length, v-length, blur, spread, colour
box-shadow: ${1:0} ${2:3px} ${3:15px} ${4:1px} ${5:rgba(0, 0, 0, .5)}$0
Copy link
Owner

Choose a reason for hiding this comment

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

Add a semi-colon.

@dsandstrom dsandstrom merged commit da6b846 into dsandstrom:master Aug 3, 2016
@dsandstrom
Copy link
Owner

Thanks @neromaki

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.

2 participants