Open/8027 - Converting Simple to SASS #19

Open
wants to merge 6 commits into
from

Projects

None yet

6 participants

@jbridson
Contributor

converted Simple to use SASS instead of CSS.

Jeremy Bridson added some commits Nov 13, 2012
Jeremy Bridson ENHANCEMENT: added additional sass files - mixins/variables/functions…
… - added plugin for sass globbing and converted the typography file to nested sass with additional font sizing/line height functionality
bc372fe
Jeremy Bridson ENHANCEMENT:added SASS nesting and variables to forms.scss bad5614
Jeremy Bridson ENHANCEMENT:added SASS nesting to the layout stylesheet c4c143a
Jeremy Bridson ENHANCEMENT:split out the layout scss into multiple files to make thi…
…ngs easier to find - created a page type folder for specific page scss - plus fixed a couple of bugs with search field.
eb00317
Jeremy Bridson MINOR:fixed baseline height unit on body 2f996be
Jeremy Bridson BUGFIX:fixed a comment that didn't have a closing tag - was causing t…
…able styles to be commented out in the css. Added a comment to the functions.scss
bba700d
@clarkepaul
Contributor

I thought we had discussed this and it wasn't to replace the default CSS Simple theme, we need to keep Simple theme as simple as possible for those learning, if people are working collaboratively and some use the CSS and some the SCSS the CSS will get overwritten. I don't mind creating a downloadable Simple theme in SCSS but this shouldn't be the default. We don't want to start forcing people to adapt technologies that become obstacles.

Is it your intention that it gives people a choice? If so we would need to take this further by educating beginners about this technology and I think we have enough on our plates.

@jbridson
Contributor

I submitted a pull request because I wanted everyone to have a discussion around this.
Who are you meaning by beginners in this situation Paul. Are you talking about SilverStripe staff or the community?

@clarkepaul
Contributor

Community most of all - we don't really use Simple theme to start a project. Simple theme is our "tutorial theme".

@jbridson
Contributor

Yeah ok I can definitely see the value in having a plain css version for the tutorial. Do you think there is any value in creating a separate SASS version then?

@adrexia
Contributor
adrexia commented Nov 16, 2012

I like the idea of providing a Sass based theme to the community. I don't think we should take away the css editable theme. If there were an easy way to do both things, without people getting confused by the SCSS folder in the repo, then it could be an option.

For one, I'd recommend compiling to :expanded rather than :compact.

@jbridson
Contributor

Yeah I did think about that. Extended makes sense for readability for beginners who want to use it. There would need to be detailed documentation somewhere though about how to use the SCSS with simple.

@clarkepaul
Contributor

Possibly giving the user an option at installation to choose CSS or SCSS

@jbridson
Contributor

I am just thinking in terms of maintaining the theme - having two copies doesn't make life easy. Is there a way of using one repo but only including the scss (and any other scss reltated files) if they choose the SCSS option? That way the beginner would only get the CSS version.

@hafriedlander

IMSHO I think we should be recommending people use the same tools we use internally, because we think that's the best way to do things (otherwise why are we using it?). We don't want anything that the community uses that we don't, because in the past without dog fooding stuff gets broken and we don't notice.

There's a legitimate point that we don't want to confuse the tutorial any more by including another technology. But, as long as the Sass is compiled as expanded, nothing stops people from editing the css. Updates aren't going to remove their changes. The only thing it does stop is them doing is committing back to the theme.

I don't see that as a big problem - if we see people raising pull requests to the css, we then explain what sass is. We will need to add / improve sass documentation so that there's a place to point people in this situation. It'd also be cool to make the tutorial dual language (like http://spinejs.com/docs/index does for coffeescript / javascript).

I guess the question is: what is Simple for - is it just a tutorial theme, or a good legitimate starting point, or a "use this if you're not a designer", or some mix?

@clarkepaul
Contributor

Think of the people who are trying out SilverStripe for the first time who have little knowledge of even CSS (not your typical developer). These guys take up a huge proportion of the downloads we get get, and they just want to try things out for a couple of hours to see if they like the CMS. Installing SS and coming to terms with what is happening is daunting enough for a beginner without distracting them with SCSS.

@adrexia
Contributor
adrexia commented Nov 16, 2012

Simple, to me, is the tutorial theme, but some might use it for other things. If Simple were the only starting point I would delete all the css and start from scratch. It doesn't add enough value to me to use it as a starting point. From a beginners point of view, I wouldn't want it to be much more complex. For people experienced with CSS, I wouldn't recommend using it.

I'm not sure whether it's worth converting it and maintaining two versions, or whether we should just offer something like the ssexpress bootstrap theme as an extra option at install. I do like the idea of offering a scss based theme. But new users don't need the added complication, and users new to editing SilverStripe themes are often a lot less technical than those new to other areas of the platform.

@jbridson
Contributor

Yea i can see where you are coming from.
Ok well I will withdraw my pull request for now and see if there are any improvements to be made to the CSS - If it is for uber beginners then maybe some more comments in the CSS itself wouldn't go astray.
Plus I see you wanted some improvements to the grid system paul? Would a grid system be too complex for beginners as well though?

@adrexia
Contributor
adrexia commented Nov 16, 2012

Oh yeah, more comments would be great! :D

I had my reservations about the grid system too. It would need to be well documented. If it's separate from the other css files, it should be easy enough for people to see what it does, and that they don't really need to touch it.

@sminnee
Contributor
sminnee commented Nov 16, 2012

I'd suggest that we keep Simple as-is and have another theme that is a good general starting point, built on SCSS.

@jbridson
Contributor

Yeah I agree... I know if I was just learning CSS again I would want to know exactly what every line of code did so I could get my head around it. If we use something like gridpak I am sure they will have some good docs that we can use as reference.
Like naomi says we already have express as a fully kitted out starting point. It would be good to repurpose it as an advanced theme.

@clarkepaul
Contributor

Yeah I was even unsure if a grid system was even taking it too far. My thought behind that was that using something like http://gridpak.com/ to generate the grid system so that users could generate their own and replace the default one with a few clicks.

@clarkepaul
Contributor

+1 for comments

@clarkepaul
Contributor

I still like the idea of a SCSS version for maintenace just we shouldn't force it upon users

@jbridson
Contributor

Right. So i will start with adding more comments to the CSS then :) and will leave the branch with my SCSS changes open just in case we want to implement them.

@chillu
Contributor
chillu commented Nov 21, 2012

@jbridson Does that mean we can close this pull request and the associated ticket then?

@jbridson
Contributor

Yeah close it for now. We can close the Trac ticket as well. Cheers Ingo.

@silverstripe-issues silverstripe-issues referenced this pull request in silverstripe/silverstripe-framework Apr 3, 2013
Closed

[2012-11-12] Converting Simple theme to SASS #1643

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment