humanitiesplusdesign / palladio

An application that brings humanities research methods to data visualization.
BSD 3-Clause "New" or "Revised" License
170 stars 31 forks source link

Add a class to the graph component for border styling #96

Closed cncoleman closed 8 years ago

esjewett commented 8 years ago

It should work to style the containing element instead. e.g.

<div id="graph-view-here" style="border: medium solid black;"></div>

Or it's possible to style all graph views with CSS (make sure to load the CSS file after the palladio.css file) using:

[data-palladio-graph-view] {
    border: medium solid black;
}

There is a difference in where the border is located between the 2 examples and therefore in the total size of the containing element, but they are otherwise similar.

Generally speaking, this CSS-based approach is what should be used to over-ride styles for the visualization components. It should be possible to use selectors based on container elements to style the same component differently at different places on a single page.

cncoleman commented 8 years ago

I would rather not have styles inline. I did add a "bordered" class to the component display div (since we may want other components bordered at times-- not graph-specific) but There was a big margin around the graph inside the border. Somehow I missed the margin 40px added in the standalone.css

esjewett commented 8 years ago

Happens to me as well. Our CSS rules are a bit scattered around.

On Sun, Nov 1, 2015 at 8:27 AM -0800, "Nicole Coleman" notifications@github.com wrote:

I would rather not have styles inline. I did add a "bordered" class to the component display div (since we may want other components bordered at times-- not graph-specific) but There was a big margin around the graph inside the border. Somehow I missed the margin 40px added in the standalone.css

— Reply to this email directly or view it on GitHub.