Skip to content
This repository has been archived by the owner on Aug 19, 2019. It is now read-only.

🆒 Add extended syntax #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

belozer
Copy link

@belozer belozer commented Jul 10, 2016

Add new syntax for write short css.

:block(block):mod(mod1):mod(mod2) :elem(elem):mod(mod)
.block_mod1.block_mod2 .block__elem_mod

or

```less
:block(block) {
    &:mod(mod) {
        :elem(elem) {
           // -> .block_mod .block__elem
        }
    }
}

@codecov-io
Copy link

codecov-io commented Jul 10, 2016

Current coverage is 100%

Merging #4 into master will not change coverage

@@           master    #4   diff @@
===================================
  Files           1     1          
  Lines           9    36    +27   
  Methods         0     0          
  Messages        0     0          
  Branches        0     0          
===================================
+ Hits            9    36    +27   
  Misses          0     0          
  Partials        0     0          

Powered by Codecov. Last updated by 4666303...3ab5b0b

@belozer
Copy link
Author

belozer commented Jul 11, 2016

THIS IS PROBLEM PR! Bad works with pseudo elements! 💣

@mistadikay
Copy link
Member

Hi @belozyorcev. Thank you for your PR, we really appreciate it and it will be reviewed in a day or two. Unfortunately I don't have time at the moment (not sure about @deepsweet)

@deepsweet
Copy link
Member

imo splitting this into 2 logical parts is a good idea:

  1. multiple :mod()
  2. :elem() with block context

but generally it looks almost good to me :)

@belozer
Copy link
Author

belozer commented Jul 12, 2016

I fix problems with pseudo.
And added optional syntax.

  • , delimeter (for mod val)
  • -> delimiter (for mod val)
  • ' single qoutes :block('b'):mod('m', 'v')
  • " double qutes :block("b"):mod("m", "v")

Next I'll work on pobems v1.0.0 with the new syntax.

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

Successfully merging this pull request may close these issues.

4 participants