These are chat archives for japgolly/scalacss

22nd
Mar 2015
David Barri
@japgolly
Mar 22 2015 06:22
Hi guys. The documentation for ScalaCSS is up. I'll probably publish the first version of ScalaCSS tomorrow but before I do, it'd be awesome to hear any feedback from you guys first.
SRGOM
@SRGOM
Mar 22 2015 07:01
This message was deleted
Otto Chrons
@ochrons
Mar 22 2015 07:35
you have both camelCase (maxWidth) and underscore_case (cursor: zoom_in)
have you considered when web servers serve CSS, which charset is used by default? because the production version is using unicode characters
Otto Chrons
@ochrons
Mar 22 2015 07:42
damn that gitbook is so sensitive to left/right scrolling when using a nipple mouse
Otto Chrons
@ochrons
Mar 22 2015 07:58
many of the examples are too terse, for example http://japgolly.github.io/scalacss/book/features/reuse.html would benefit from having an actual use case there instead of just the class definitions
Chandra Sekhar Kode
@chandu0101
Mar 22 2015 08:02

actual use case there instead of just the class definitions

+1 , i know its more work mate but thats what masses needed :)

Otto Chrons
@ochrons
Mar 22 2015 08:03
also a link to the Github repo would be good
a "teaser" page would be great, to show typical CSS issues and how ScalaCSS solves those
Otto Chrons
@ochrons
Mar 22 2015 08:08
I find the addClassNames especially compelling, as it is such a big pain in the ass when using these CSS libs
David Barri
@japgolly
Mar 22 2015 08:12
Ergh, I feel like there was a specific reason I didn't camel case literal values but I don't remember it now and agree there's no reason it should be inconsistent, ergh :(
The characters are ascii - they're in the range of a0-ff (I looked at the css spec) - they should be ok.
Maybe I should just change it to < 80h
What do you mean about too terse? The reuse example is a proper use case (container/label/checkbox). Do you mean that I didn't add specific styles like margin-blah-blah? Why are they needed (or better to have)? They're arbitrary and irrelevant in that case. Help me understand cos I don't get it :)
David Barri
@japgolly
Mar 22 2015 08:17
Cool, will link to the repo
I'm sure about what to put on a teaser page - wouldn't it all just end up being code that someone would have to mentally parse? Personally my brain switches off for that.
Cool re addClassNames - I'm looking forward to some freedom there too
Thanks for the feedback guys! I'll note those changes to make
Otto Chrons
@ochrons
Mar 22 2015 08:19
the reuse-page doesn't have anything else besides definitions like class MyStyleModule(implicit r: mutable.Register) extends StyleSheet.Inline {
David Barri
@japgolly
Mar 22 2015 08:20
oh im such an idiot - for some reason I thought it was the nested-styles page
Isn't that a good thing? No noise, just the important bits.
Less work for the reading brain
Otto Chrons
@ochrons
Mar 22 2015 08:23
no, because you need to read it many times to understand what is it useful for :)
David Barri
@japgolly
Mar 22 2015 08:25
So would a slightly bigger example help? Like imagine i had something like this:
class theme { val buttonStyle = ??? }
class app { val theme = ??? }
app.theme.buttonStyle
Is that the kind of thing you mean?
Otto Chrons
@ochrons
Mar 22 2015 08:28
just something where you actually use something defined in the MyStyleModule
David Barri
@japgolly
Mar 22 2015 08:29
I could add an example underneath it
Otto Chrons
@ochrons
Mar 22 2015 08:29
and ASCII is 7bits, anything more than that is some charset, like ISO-8859-1 :)
David Barri
@japgolly
Mar 22 2015 08:30
Isn't 7-bit ascii ascii7 and old-school ascii actually 8859-1?
Otto Chrons
@ochrons
Mar 22 2015 08:31
eg. in Java,
US_ASCII
Seven-bit ASCII, a.k.a.
David Barri
@japgolly
Mar 22 2015 08:32
Screw it - i'll just keep the default at <80h, then all charsets (that I know of) are happy :D
Otto Chrons
@ochrons
Mar 22 2015 08:32
by default web servers/browsers assume iso-8859-1, except for JSON which is always utf8
but you never know if someone configures their web server to serve HTML/JS/CSS as utf8
David Barri
@japgolly
Mar 22 2015 08:34
I'd imagine in this day and age people should have their charsets sorted. I acknowledge that this still isn't really the case :(
Otto Chrons
@ochrons
Mar 22 2015 08:35
and if you produce CSS via println, the system charset settings will affect how it will be stored etc :)
David Barri
@japgolly
Mar 22 2015 08:35
(Re: sharedmodule example) The problem is, it's sort of hard to show usage because it's not scalajs-react - there is no usage really. I can just show that you get a StyleA which has a classname which is what you'd apply in something like scalajs-react.
It seems to weaken the example.
Otto Chrons
@ochrons
Mar 22 2015 08:39
well of course you should advertise scala-reactjs there :stuck_out_tongue_winking_eye:
David Barri
@japgolly
Mar 22 2015 08:40
Oh.... like here's an example using shared modules with scalajs-react? Hahaha that's a neat idea! I didn't think of that. A little sprinkle of that here and there should be ok
Otto Chrons
@ochrons
Mar 22 2015 08:42
yea, this is not an academic exercise but a full-blown marketing campaign! ;)
winning the souls of frontend devs etc
David Barri
@japgolly
Mar 22 2015 08:47
Weeeeeeeeeeeeell I only partially share your goal there
The souls of frontend devs aren't always worth much
It's volatile hehehe :D
Anyway I'd better get off the computer. Thanks a lot for the feedback. I'll make most of the changes you suggested :)
Otto Chrons
@ochrons
Mar 22 2015 09:00
no probs, I'm going cross country skiing now :ski:
Per Wiklander
@PerWiklander
Mar 22 2015 11:15
I don’t know if any one is interested but I had to fiddle around a bit to get it working. Sticky footer with a fixed top menu in Semantic-UI: http://jsfiddle.net/sswqa1ot/2/
David Barri
@japgolly
Mar 22 2015 11:54
Have fun @ochrons ! Also I updated the code and doc after feedback so thank you again. The reusing-styles page now has a larger example.
cwitty
@cwitty
Mar 22 2015 17:59
@PerWiklander I tried your jsfiddle, and the footer seems not to be sticky at all. (On Chrome 42 for Linux.)
Per Wiklander
@PerWiklander
Mar 22 2015 18:01
@cwitty maybe we don’t have the same definition of “sticky”? The aim is to get the footer to sit at the bottom of the viewport IFF the content does not fill the viewport height.
cwitty
@cwitty
Mar 22 2015 18:03
Ah. I was assuming you wanted to replicate the new CSS "position: sticky", which is that the footer is always on-screen: it scrolls with the body unless that would push it off-screen, in which case it sticks to the bottom.
Yes, now that I understand what you're doing, it does work. Nice effect.
Per Wiklander
@PerWiklander
Mar 22 2015 18:05
Yeah I guess the name was made up before the other “sticky” took over. See https://www.google.se/search?q=sticky+footer
It’s been around for a while… but nowadays it’s pretty easy to do it.
So the sticky you thought of is done like this in S-UI? http://semantic-ui.com/modules/sticky.html
cwitty
@cwitty
Mar 22 2015 18:10
Yep, looks like.