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

Consolidate stylesheets? #11

Open
wraseman opened this issue Oct 25, 2018 · 6 comments
Open

Consolidate stylesheets? #11

wraseman opened this issue Oct 25, 2018 · 6 comments
Labels
question Further information is requested

Comments

@wraseman
Copy link
Collaborator

@joshhjacobson, is there a compelling reason not to consolidate the various stylesheets into a single CSS file (which I would call parasol.css) for the sake of simplicity in app development?

That way, users could replace this...

<link rel="stylesheet" type="text/css" href="./parcoords.css">
<link rel="stylesheet" type="text/css" href="style.css">

<!-- include slickgrid stylesheets -->
<link rel="stylesheet" href="./lib/slickgrid/slick.grid.css" type="text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="./lib/slickgrid/jquery-ui-1.8.16.custom.css" type="text/css" />
<link rel="stylesheet" href="./lib/slickgrid/plugins/slick.columnpicker.css" type="text/css"/>

With this!

<link rel="stylesheet" type="text/css" href="parasol.css">

Let me know, so I can implement this if you don't see an issue with it.

@wraseman wraseman added the question Further information is requested label Oct 25, 2018
@joshhjacobson
Copy link
Member

For app development (use with html) this is a feasible. I agree that it would be a good idea to provide users with a single stylesheet that handles default formatting for the page, parcoords, and slickgrid. Yes, lets call it parasol.css. That said, more advanced users could still provide their own stylesheets in place of this default.

Your point also led me to another question. In the same way that we use

import './parallel-coordinates.css';

at the top of index.js, might we also want to do something like

import './slick-grid.css';

there as well? This would mainly serve the npm library aspect of parasol and not the html use since any stylesheets addressing slickgrid in the html would take precedence over this.

The thing I want to keep in mind is that the user should always have the freedom to customize slickgrid and I don't know if doing this would inhibit that freedom.

@wraseman
Copy link
Collaborator Author

Perhaps we can discuss this in person? You're more familiar with npm libraries than I am, so a bit of clarification would help on my end.

I'll go ahead and make a combined styling sheet and do a pull request.

@joshhjacobson
Copy link
Member

Sounds great! Yeah, l'll email you about a time for next week.

@wraseman
Copy link
Collaborator Author

Implemented this in recent commit

@joshhjacobson
Copy link
Member

I'm going to keep this open until I have a chance to test out the effects of including style sheets in the library directly. Also, I think the "proper" way to build the parasol.css file is to include default styling for all dependencies (i.e. parcoords and slickgrid) but leave the page styling out. Of course, we can still include a style.css file in the demos directory that can be used for general page formatting.

This way, the general setup would be

<link rel="stylesheet" type="text/css" href="parasol.css">
<link rel="stylesheet" type="text/css" href="style.css">

@joshhjacobson joshhjacobson reopened this Nov 29, 2018
@wraseman
Copy link
Collaborator Author

Got it! I'll update the examples and tutorial accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants