Skip to content

Conversation

@caesar2164
Copy link
Contributor

@frrrances & @ormsbee - here are the straggling SASS changes to get the Stanford theming branch into master.

I replaced a few variables with general ones. (btw, going forward we all need to talk about variable naming and stuff...)

I also discovered how lovely SASS mixins truly are, and I think we should use them everywhere to enable nitty gritty theming...

@ghost ghost assigned frrrances May 31, 2013
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this needs to be commented out because the sass won't compile when it doesn't exist.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this file be removed from source control entirely if it's being dynamically generated now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I asked @caesar2164 to throw this in just so that you guys can see what the site looks like when running, but in the templating PR I'll submit soon, this won't be needed. Definitely don't want to merge this file as is though, as @frrrances mentioned.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is getting untracked and will be generated automatically once @natehardison's PR lands.

@frrrances
Copy link
Contributor

aside from what i mentioned above, and pending review by @ormsbee, this looks ready. and yes, we should definitely talk naming conventions, maybe later this week... or after 6/11.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor, but I think you can just go with if env.get('THEME_NAME'): unless you need to check for None specifically.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make a note to change it in the templating PR.

@natehardison
Copy link
Contributor

@caesar2164 @frrrances @ormsbee thanks all for the work. One of the hard parts about this theming is that we have lots of interdependencies between the templating work I've been doing and the Sass work @caesar2164's done. From this PR, we do not need the changes to the Rakefile or the changes to the *.scss.mako files, since those will land elsewhere. What we do really need are the Sass changes to all of the _*.scss files, since those are unique to this PR, and they do not depend on any Rakefile or templating changes to work properly with the main edX site (i.e., they shouldn't change anything about the main site's style). However, @caesar2164 sent in all of these files because we wanted to make it possible for you to run the code and see the changes in a local environment. Nothing a little git rebase -i can't fix!

Thanks for the Saturday review.

@frrrances
Copy link
Contributor

thanks @natehardison! i see how the changes in this PR make sense along with the other PR, though I'll need to check in with the rest of the team tomorrow morning to really get the full picture. thanks for all the hard work this weekend!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing we've tried to do recently with our Sass is to leverage Sass' extend functionality for defining static CSS rules we want to use over and over as an archetype. We tend to use mixins for anything we're passing arguements/variables into. See https://github.com/edx/edx-platform/blob/master/common/static/sass/_mixins.scss for a good example of what we're doing.

@caesar2164, would you mind making these extend definitions rather than mixins (it'll require you to also change your reference syntax elsewhere to @extend from @include)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@talbs - I think these do need to be mixins though, as these are theme specific and not class specific...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caesar2164 I don't agree with that logic.

Mixins and extends shouldn't be chosen for the purpose of differentiating whether something is related to a theme or a general re-usable styling element (this is what I'm assuming you're referring to as a "class"). That differentiation should happen within our other Sass/CSS practices - such as breaking things up into a core set of Sass rules/styles and overriding/extending with theme-based Sass after (what we're all doing in general with this theme add-on).

Here's a simple example of how extends and mixins are used, alongside how they render - https://coderwall.com/p/7p7w2a. Also, here's another rundown on how they're different - http://blog.kiskolabs.com/post/5445752361/extend-your-sass. Using extends for static shared css rules has a few benefits:

  • Bloat - less bloat and redundancy from rendered rule to rule
  • Code Clarity - differentiation to front end developers on when a value/argument needs to be passed in for proper use (extends don't take arguments, thus in an app/site that leverages extends, it would be clearer when arguments/settings, due to the @include(arguments) syntax are needed when using a mixin vs. a site/app that used mixins for everything.)
  • Definition/Use in Context - extends can be defined in the appropriate context of our Sass architecture - we have a lot of global/utility classes/extends defined in the example I provided, but I have also started creating classes to extend in other places, namely in our typography settings (https://github.com/edx/edx-platform/blob/master/cms/static/sass/elements/_typography.scss) for Studio. This helps in managing base rules by grouping them by purpose.

If this will cause you headaches now in getting things going for 6/11, it can wait until a follow-up with theming is done. Its important we are all on the same page as a team on how to create re-usable and foundational styling rules longer-term

I'm happy to talk this over more on HipChat or a video chat too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After talking it over with @caesar2164 and @natehardison, this mixin is needed due to the limitations of the current theming implementation. @caesar2164's recommendation to move it to _shame.scss makes sense and we can revisit how to implement a theme's variables and overrides in the larger theming project.

@talbs
Copy link
Contributor

talbs commented Jun 3, 2013

Given that @caesar2164 is making a few tweaks (font-weight, moving mixins to _shame.scss) per today's comments/discussions, this set of tweaks is fine to be merged from my perspective.

👍

@caesar2164
Copy link
Contributor Author

@talbs, @natehardison, @frrrances, @ormsbee - As the courses.scss is getting untracked in the templating PR, should I leave that file as is, change it, or what?

Once that is dealt with, is this good to merge?

@frrrances
Copy link
Contributor

👍 from me too.

@talbs
Copy link
Contributor

talbs commented Jun 3, 2013

Things look good on this branch, but one issue that both @frrrances and I ran into when pulling form a local copy was a lot of local file merge conflicts. I'm not sure what is causing this, but we both reproduced it after previously checking out this branch and pulling from origin to it. I was able to do it a second time after deleting this branch locally and checking it out again. I'm not sure if this will carry over to master once this is merged in, but we don't want others running into this. Are you folks seeing this as well?

@caesar2164
Copy link
Contributor Author

I rebased this branch off of master a bunch of times and then had to force push...could that be what you're seeing?

@natehardison agrees!

@talbs
Copy link
Contributor

talbs commented Jun 3, 2013

Okay, makes sense. In you and @natehardison, I trust. 👍

@ormsbee
Copy link
Contributor

ormsbee commented Jun 4, 2013

👍

@cpennington
Copy link
Contributor

Closing in favor of pull request #57

@caesar2164 caesar2164 closed this Jun 4, 2013
chrisrossi referenced this pull request in jazkarta/edx-platform Dec 16, 2014
bdero referenced this pull request in mitocw/edx-platform Feb 7, 2015
reidransom added a commit to DefyVentures/edx-platform that referenced this pull request Jun 9, 2015
ooduye pushed a commit to ooduye/edx-platform that referenced this pull request May 11, 2016
* fix-reset-page:
  [#118698597] Add the navigation menu
  [#118698597] change reset detail page text and title
  [#118698597] Change email label
  [#118698597] remove irrelevant navigation from menus
  [#118698597] use context variable
  [#118698597] update reset details page
  [#118698597] Update reset details page
  Change route in url file
prabhanshu pushed a commit to prabhanshu/edx-platform that referenced this pull request Oct 13, 2018
Syncing changes from oxa/master.fic to oxa/devfic: CDN Endpoint & MatPlotLib Fixes
yasir1brahim pushed a commit to yasir1brahim/edx-platform that referenced this pull request May 24, 2021
Sujeet1379 pushed a commit to chandrudev/edx-platform that referenced this pull request Nov 17, 2022
[TNL-7072] When a sequence navigation would overflow, convert it to a dropdown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants