Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separating Sass code into core, theme and config modules #58

Closed
wants to merge 1 commit into from

Conversation

fabien-d
Copy link
Contributor

I separated the Sass code into 3 separate files for easier look and feel updates.

  • _modalConfig.scss
  • _modalCore.scss
  • _modalTheme.scss

I'm using the plugin for our current project and the only downside was how the look and feel was tied to the core styles.

This has helped me since the theme styles are separated from the core and the risk of breaking the functionality is reduced.

The only actual change is removing the BG data image which I replaced with CSS styles to allow customization.

Replaced:

// Background for overlay – Data URI because of IE8 not supporting rgba
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAEElEQVR42gEFAPr/AAAAAMwA0QDNTiUx4gAAAABJRU5ErkJggg==');

With:

background: #000;
background: rgba(0,0,0, $modal-bg-opacity / 100 );
filter: alpha(opacity=$modal-bg-opacity);

Feel free to ignore if this is not going in the direction you want!

@drublic
Copy link
Owner

drublic commented Jul 12, 2013

Thanks for the effort you put into this pull request. I like the idea and I think this is something we could consider for 1.1.0.
I'll leave this unmerged for now to look into this issue myself with the current implementation and the different animation styles we'd like to include (#51).

The problem with changing the background to a filter in IE could be that there are other quirks that come with it. Also I personally don't like to rely on filters. But I will look into this again :)

@fabien-d
Copy link
Contributor Author

I'm not a fan of filters - but in these small cases I tend to use them! You could always rely on rgba() and fallback to the data:image to give more flexibility to supported browsers and not for others.

And again, feel free to ignore this - I was simply going to open an issue to separate core and theme since the look and feel I'm using for my project is very different than your default. But since I had done something to solve my problem, I figured it would be a great discussion point!

The issue I'd like to get resolved is to be able to update the modal without having to go through restyling for every versions.

@grayghostvisuals grayghostvisuals mentioned this pull request Sep 28, 2013
drublic added a commit that referenced this pull request Oct 7, 2013
Closes #58. Thanks to @fabien-d.
Closes #66.
Closes #73.
@drublic
Copy link
Owner

drublic commented Oct 7, 2013

We've applied the changes as outlined in #73 for the new structure. Thanks again for providing the idea and valuable input :)

@drublic drublic closed this Oct 7, 2013
drublic added a commit that referenced this pull request Oct 7, 2013
Closes #58. Thanks to @fabien-d.
Closes #66.
Closes #73.
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.

None yet

2 participants