Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

QA style API with styling examples#162

Closed
chriddyp wants to merge 3 commits intomasterfrom
styling-examples
Closed

QA style API with styling examples#162
chriddyp wants to merge 3 commits intomasterfrom
styling-examples

Conversation

@chriddyp
Copy link
Copy Markdown
Member

related to #160, part of #149

@chriddyp chriddyp temporarily deployed to dash-table-review-pr-162 October 23, 2018 03:27 Inactive
@chriddyp
Copy link
Copy Markdown
Member Author

This is looking pretty good. I left a few TODOs in the code for things that didn't work. @Marc-Andre-Rivet - can you take a look?
In particular:

  • boxShadow in style_cells for the "style as a list" examples
  • paddingTop, paddingBottom in style_cells

@chriddyp
Copy link
Copy Markdown
Member Author

cc @cldougl @valentijnnieman

@Marc-Andre-Rivet
Copy link
Copy Markdown
Contributor

@chriddyp I'll assume "style as a list" is broken as I was not aware of it's existence. For padding I'll see what's happening.

@chriddyp
Copy link
Copy Markdown
Member Author

I'll assume "style as a list" is broken as I was not aware of it's existence

OK, I recommend taking a thorough look through all of the review apps that I've created and the docs that I've made in https://github.com/plotly/dash-docs/pull/232. There shouldn't be any surprises here!

columns=[{'id': c, 'name': c} for c in df.columns],

# feels odd that I need to specify both of these
content_style='grow',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes. Discussed this with @cldougl at some point. As a follow up to the styles work, we are probably capable of knowing if there is a column uses %-based width and make content_style internal at some point.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

does content_style just update some table styles? If so, could we remove content_style from the docs and replace it with a set of CSS styles, e.g.:

style_table={
    'width': '100%',
    'tableLayout': 'auto'
}

'box-shadow': ', '.join([
'inset 0px 1px 0px 0px #CCC',
'inset 0px -1px 0px 0px #CCC'
]),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Apparently box-shadow was not in the list of CSS Properties I picked up from the mozilla page. Will double check and update as needed.

]),

# TODO - This only applies on the headers?
'paddingTop': '10px',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should work everywhere. Will investigate what's happening here.

@Marc-Andre-Rivet
Copy link
Copy Markdown
Contributor

Update styling props with #165, will do a second round once merged.

@chriddyp chriddyp temporarily deployed to dash-table-review-pr-162 October 25, 2018 14:41 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants