Home Download Buy Blog Forum Support

Addition to CSS zen coding

Re: Addition to CSS zen coding

Postby sublimator on Fri Feb 17, 2012 2:31 am

Actually, in latest version of Zen (unreleased as yet ... need to find the time) I've made a bunch of ergonomic improvements to the `as you type` including automatically inserting the `+` on space bar where it makes sense (not in strings)

Right now it is almost working except for values being after ';':


Fixed that too! I Made a custom filter to modify the nodes to put that in the expected place and the input panel has a bunch of bindings to make inserting and navigating over the punctuation like {} much nicer.

I made it so any semi colons, get automatically remapped to `:` as an experiment. I much prefer a semicolon there as you don't have to use the shift key. I was pondering changing that in all the snippets directly.

When I was unemployed a while back, I was toying with the idea of charging $3.50 for Zen to make a few dollars.

http://zencoding.akalias.net/releases/z ... ation.html
http://zencoding.akalias.net/releases/1.6.0a.html

I got distracted making testing and grammar dev tools and then got employment :) I'll try and find the time to fix it up and share it but there's still lots of work to be done.
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Addition to CSS zen coding

Postby pod on Fri Feb 17, 2012 3:51 am

castles_made_of_sand wrote:http://zencoding.akalias.net/releases/z ... ation.html
http://zencoding.akalias.net/releases/1.6.0a.html

Cool stuff man, how can I get this? :)
pod
 
Posts: 37
Joined: Sun Nov 07, 2010 3:32 am

Re: Addition to CSS zen coding

Postby sublimator on Fri Feb 17, 2012 5:26 am

Yeah, it's not `finished` soz :)

I don't really want to be obliged to support something in the case of just a few people buying/donating.

It was just one of those, oh damn, I need some money, stupid ideas.

So, failing that, I'm not sure how much time I'd want or even could could sink into it.

I'm not sure when exactly I'll get around to finishing/pushing it but I plan to.
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Addition to CSS zen coding

Postby sublimator on Fri Feb 17, 2012 5:27 am

Having said that, if there's enough interest, who knows?
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Addition to CSS zen coding

Postby agibsonsw on Fri Feb 17, 2012 9:36 am

Personally, I'm not attempting to build anything significant with this. ZenCoding is a fantastic feature already. I'm just studying/ dabbling at the moment. If it happens that I create something that others find useful or interesting, then that's great :D
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Addition to CSS zen coding

Postby sublimator on Fri Feb 17, 2012 2:35 pm

agibsonsw wrote:I'm not attempting to build anything significant with this.


Dude, keep having fun and experimenting, what it's all about! Fuck the naysayers! Just do what your doing.
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Addition to CSS zen coding

Postby agibsonsw on Fri Feb 17, 2012 6:43 pm

castles_made_of_sand wrote:Dude, keep having fun and experimenting, what it's all about! Fuck the naysayers! Just do what your doing.


Thank you. That was my intention anyway :D
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Addition to CSS zen coding

Postby sublimator on Fri Feb 17, 2012 11:33 pm

agibsonsw wrote:That was my intention anyway


haha, yes of course, sorry, was a bit drunk and confused after a wedding
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Addition to CSS zen coding

Postby agibsonsw on Sat Feb 18, 2012 12:19 am

castles_made_of_sand wrote:haha, yes of course, sorry, was a bit drunk and confused after a wedding

I'm discovering a lot about regular expressions 8-) . I've managed to compact it such that terms such as bb, bbc, brs construct:
border-bottom, border-bottom-color, border-right-style

but the separate words (border, bottom, color) only appear once within the regex expressions. That is, it grabs the term 'border' and then decides whether it needs to append '-bottom' and then perhaps '-color'. (It also means I no longer need to type hyphens.) In a similar way I've combined margins with padding. I like this :D

It's amazing what can be achieved in one Snippet (with a little effort..)! I'm having second thoughts about the help text though, as it's making it a bit verbose. I might change my mind and just have a second snippet (proph) which just produces help text within a css comment, or just abbreviate the help text.

I would still like to be able to put apostrophes or quotes around font names, but they throw everything off(?).

Again, I'm not attempting to substitute for ZenCoding, but I like the idea of a single Snippet being capable of all of this. Regards, Andy.

PS It occurred to me that, using the technique above, I could also provide property-values that are contextual (like ZC..). I'll probably not do this though..
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Addition to CSS zen coding

Postby agibsonsw on Sat Feb 18, 2012 4:57 pm

I've finished this now (and I can move on!). I think it's in its optimal state for a single Snippet. It includes most of the major properties. You can now type 'por' for 'position: relative;', etc.

I eventually discovered that the maximum number of variables is 100 (or 99)!

Code: Select all
<snippet>
   <content><![CDATA[/* ${1} : ${1/($)|.*(?:\b| )((b)|(c)|(d)|(e)|(f)|(h)|(l)|(m)|(o)|(p)|(q)|(r)|(t)|(v)|(w)|(z)).?$|.*/?1:Type to for top etc., followed by a space:?3:BAckground-Attach etc BOTtom BOrder-Collapse-Spacing BC BS BW BorderBottom\(Color\/Style\/Width\) etc:?4:CLear CLIp COlor CONtent CUrsor Counter-Inc-Reset Caption-Side:?5:DIsplay DIRection:?6:Empty-Cells:?7:FOnt F-Family-SI\/ST\/W\/V FLoat:?8:HEight:?9:LEft LEtter-Spacing Line-Height List-Style I\/P\/T:?10:MArgin T\/R\/B\/L MAx\/MIn-Height\/Width:?11:OUtline-Color-Style-Width OVerflow:?12:PAdding T\/R\/B\/L POsition-Abs\/Rel\/Fixed\/Static:?13:QUotes:?14:RIght:?15:TOp TExt-Align\/D\/I\/T:?16:Vertical-Align VIsibility:?17:WHite-space WIdth WOrd-spacing:?18:Z-index/i} */$0${1/\\|(?:\b| )((ba((a)|(c)|(i)|(p)|(r))?)|(bot)|(bo((c)|(s))?)|(((bb)|(bl)|(br)|(bt)|b)((c)|(s)|(w))?)|(cli)|(con)|(co)|(cu)|(cl)|(c((i)|(r)))|(cs)|(dir)|(di)|(ec)|((ff)|(fsi)|(fst)|(fv)|(fw)|fo)|(fl)|(he)|(les)|(le)|(lh)|(ls((i)|(p)|(t))?)|(((ma)|(mi))((h)|(w)))|(((ma)|(pa))((b)|(l)|(r)|(t))?)|(ou((c)|(s)|(w))?)|(ov)|(po((a)|(r)|(f)|(s))?)|(qu)|(ri)|(to)|(te((a)|(d)|(i)|(t)))|(va)|(vi)|(wh)|(wi)|(wo)|(z)|([0-9]*)(cm|em|ex|in|mm|pt|pc|px|\%)((4)|3))( |$)|( {2,}|\t)/?2:;\nbackground(?4:-attachment:?5:-color:?6:-image:?7:-position:?8:-repeat)\: :?9:;\nbottom\: :?10:;\nborder(?12:-collapse:?13:-spacing)\: :?14:;\nborder(?16:-bottom:?17:-left:?18:-right:?19:-top)(?21:-color:?22:-style:?23:-width)\: :?24;\nclip\: :?25:;\ncontent\: :?26:;\ncolor\: :?27:;\ncursor\: :?28:;\nclear\: :?29:;\ncounter-(?31:increment:?32:reset)\: :?33:;\ncaption-side\: :?34:;\ndirection\: :?35:;\ndisplay\: :?36:;\nempty-cells\: :?37:;\nfont(?38:-family:?39:-size:?40:-style:?41:-variant:?42:-weight)\: :?43:;\nfloat\: :?44:;\nheight\: :?45:;\nletter-spacing\: :?46:;\nleft\: :?47;\nline-height\: :?48:;\nlist-style(?50:-image:?51:-position:?52:-type)\: :?53:;\n(?55:max:?56:min)(?58:-height:?59:-width):?60:;\n(?62:margin:?63:padding)(?65:-bottom:?66:-left:?67:-right:?68:-top)\: :?69:;\noutline(?71:-color:?72:-style:?73:-width)\: :?74:;\noverflow\: :?75:;\nposition\: (?77:absolute:?78:relative:?79:fixed:?80:static):?81:;\nquotes\: :?82:;\nright\: :?83:;\ntop\: :?84:;\ntext(?86:-align:?87:-decoration:?88:-indent:?89:-transform)\: :?90:;\nvertical-align\: :?91:;\nvisibility\: :?92:;\nwhite-space\: :?93:;\nwidth\: :?94:;\nword-spacing\: :?95:;\nz-index\: :?96:$96$97 $97 $97:?99: $97/gi};
]]></content>
   <tabTrigger>propx</tabTrigger>
   <scope>source.css  meta.property-list.css</scope>
   <description>po to, etc</description>
</snippet>
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests