tag:blogger.com,1999:blog-34454975.post7272098341517385340..comments2023-06-28T16:58:41.189+02:00Comments on Web Reflection: restyle.js - a simplified CSS approachAndrea Giammarchihttp://www.blogger.com/profile/16277820774810688474noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-34454975.post-28920346280218920582014-02-13T18:24:22.047+01:002014-02-13T18:24:22.047+01:00nice one, although the viewport size calculation i...nice one, although the viewport size calculation is a bit more problematic than clientHeight and clientWidth, specially on mobile.<br /><br />How about you have a look to `display` module too ?<br /><br />it does the "observing" in a non so aggressive way and you can add your own listener via `display.on('change', yourCallback)` it will provide width and height of the container, not the one of the html section ;-)<br /><br /><a href="https://github.com/WebReflection/display#display" rel="nofollow">display</a>Andrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-76064206155813345362014-02-13T14:36:07.952+01:002014-02-13T14:36:07.952+01:00Hey pal, I've updated my v-unit.js to use the ...Hey pal, I've updated my v-unit.js to use the same head tag selection as your restyle. We happened to share the CSS node technique, though. Check it out: https://github.com/joaocunha/v-unit<br /><br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-34454975.post-45301710119163304112014-02-09T19:58:21.212+01:002014-02-09T19:58:21.212+01:00@fibric another solution would be that you find ou...@fibric another solution would be that you find out which prefix is needed and you wrap `restyle` sending that Array with just one prefix so that you will be virtually happy about used prefixes behind the runtime scene ;-)<br /><br />there is a solution, if that somehow disturbs you ... but unless there are evidences current approach is problematic, I don't think it make sense increase size and logic because of some philosophy, you know what I mean.<br /><br />Take careAndrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-20990032099808782812014-02-09T19:16:00.631+01:002014-02-09T19:16:00.631+01:00@Daniele rework seems different and way closer to ...@Daniele rework seems different and way closer to absurd, but it starts from reading CSS, so basically the opposite of what `restyle` does.<br /><br />@Krasimir thanks for the update, although 30KB will do much more than `restyle`. I'd like to know your opinion about `restyle` design choice, in terms of object are shaped, thanks.<br /><br />@fibric does it make sense to serve CSS files that contain vendor prefixes your browser won't use? Yes? restyle does the same. No? restyle does the same … do you have any specific problem with that at runtime since you'll never even see those CSS that will be simply ignored/not used ? If so, please file a bug … if no, how can I help you? :-)Andrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-73921115429313998802014-02-09T15:49:59.888+01:002014-02-09T15:49:59.888+01:00Hmm if its useful for a browser 'at runtime...Hmm if its useful for a browser 'at runtime' why vendor prefixes are applied for all mentioned browser but not the one which is executing this js?<br /><br />does it make sense to create -moz prefix when my chrome is doing magic?fibrichttps://www.blogger.com/profile/04552795823792240384noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-59309388899048304832014-02-09T13:25:12.294+01:002014-02-09T13:25:12.294+01:00Just to mention that Absurd.js is ported for clien...Just to mention that Absurd.js is ported for client side usage and could produce CSS at runtime.Krasimirhttps://www.blogger.com/profile/05927852961383849840noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-63699767008587035182014-02-09T11:27:19.388+01:002014-02-09T11:27:19.388+01:00Rework from visionmedia is very similar to restyle...Rework from visionmedia is very similar to restyle:<br /><br />https://github.com/reworkcss/reworkAnonymoushttps://www.blogger.com/profile/13726942841080492957noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-87387668583439116972014-02-08T23:49:19.102+01:002014-02-08T23:49:19.102+01:00updated here and there the fact indeed restyle has...updated here and there the fact indeed restyle has been inspired by absurd.js but instead of being a full preprocessor it is something useful at runtime for the browsers too … and can be used upfront or with probably similar objects on the server side too.Andrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-56942194421291781592014-02-08T23:25:45.793+01:002014-02-08T23:25:45.793+01:00Brilliant!Brilliant!Anonymoushttps://www.blogger.com/profile/18089480968074676379noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-28844917271057356872014-02-08T22:47:32.564+01:002014-02-08T22:47:32.564+01:00absurd.jsabsurd.jsBlerikhttps://www.blogger.com/profile/06986576198583594291noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-33741522072029857402014-02-08T22:24:57.485+01:002014-02-08T22:24:57.485+01:00THIS IS EXCELLENT STUFF!
Have a look at the Absur...THIS IS EXCELLENT STUFF!<br /><br />Have a look at the AbsurdJS css-preprocessor which does some of the same stuff but reduces rulesets.<br /><br />http://krasimir.github.io/absurd/<br />David F Kayehttps://www.blogger.com/profile/01439467556022193241noreply@blogger.com