Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Width customization #62

Closed
worldofsmarty opened this issue Dec 3, 2014 · 4 comments
Closed

Width customization #62

worldofsmarty opened this issue Dec 3, 2014 · 4 comments
Assignees

Comments

@worldofsmarty
Copy link

How to customize the size at which the table is converted to stack. Default is 40em (640px) How to increase say 60em or 900px

@relaxatorium
Copy link
Contributor

If you are only using the stack tables, I think you can accomplish this with the SCSS mixin (see the "Using Stack-Only TableSaw SCSS Mixin" section of the Readme).

If you are only using CSS, or are using the full tablesaw plugin, then currently I think you'd need to just add additional tablesaw targeted media queries using your requested size to your own CSS, using the same stack table CSS the default uses. That solution is a bit of a hack outside the plugin, but would likely work.

@zachleat
Copy link
Member

zachleat commented Dec 5, 2014

Thanks @relaxatorium!

This is the main reason we provide the SCSS mixin. If you aren’t using SCSS in your workflow, unfortunately some monkey patching is in your future.

https://github.com/filamentgroup/tablesaw/blob/master/dist/tablesaw.css#L552
https://github.com/filamentgroup/tablesaw/blob/master/dist/tablesaw.css#L568
are the two lines to update.

Please reopen if you have additional questions.

@zachleat zachleat closed this as completed Dec 5, 2014
@zachleat zachleat self-assigned this Dec 5, 2014
@extractachris
Copy link

The mixin will not work with any other css file, correct? For example: tablesaw.bare.css

@relaxatorium
Copy link
Contributor

That is correct, I believe.

It probably could be made to work with the tablesaw.bare.css with some wrangling or overrides, but with the current project infrastructure, tablesaw.stackonly.scss (which provides this mixin) is only a drop-in replacement for tablesaw.stackonly.css, which includes all the default tablesaw styles.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants