From a35caecfcc347fc53f89b98116a1aae7fb5b8c7b Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 30 Jul 2024 14:25:44 -0400 Subject: [PATCH 1/2] docs: Update note on style keys allowing for kebab-case --- shiny/render/_data_frame_utils/_datagridtable.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/shiny/render/_data_frame_utils/_datagridtable.py b/shiny/render/_data_frame_utils/_datagridtable.py index 5fda64f13..ff249563f 100644 --- a/shiny/render/_data_frame_utils/_datagridtable.py +++ b/shiny/render/_data_frame_utils/_datagridtable.py @@ -90,9 +90,9 @@ class DataGrid(AbstractTabularData, Generic[DataFrameLikeT]): * `cols`: The column numbers to which the style should be applied. If `None`, the style will be applied to all columns. * `style`: A dictionary of CSS properties and values to apply to the selected - rows and columns. The keys must be _camelCased_ CSS property names to work - properly with react.js (e.g. `backgroundColor` instead of - `background-color`). + rows and columns. Traditional _kebab-cased_ CSS property names (e.g. + `background-color`) will work in addition to _camelCased_ CSS property names + (e.g. `backgroundColor`). * `class`: A string of CSS class names to apply to the selected rows and columns. If both `style` and `class` are missing or `None`, nothing will be applied. If @@ -249,9 +249,9 @@ class DataTable(AbstractTabularData, Generic[DataFrameLikeT]): * `cols`: The column numbers to which the style should be applied. If `None`, the style will be applied to all columns. * `style`: A dictionary of CSS properties and values to apply to the selected - rows and columns. The keys must be _camelCased_ CSS property names to work - properly with react.js (e.g. `backgroundColor` instead of - `background-color`). + rows and columns. Traditional _kebab-cased_ CSS property names (e.g. + `background-color`) will work in addition to _camelCased_ CSS property names + (e.g. `backgroundColor`). * `class`: A string of CSS class names to apply to the selected rows and columns. If both `style` and `class` are missing or `None`, nothing will be applied. If From dfd026476b562143650fc9cbed89587b23953818 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 30 Jul 2024 14:31:35 -0400 Subject: [PATCH 2/2] lint --- shiny/render/_data_frame_utils/_datagridtable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shiny/render/_data_frame_utils/_datagridtable.py b/shiny/render/_data_frame_utils/_datagridtable.py index ff249563f..93cfd57a8 100644 --- a/shiny/render/_data_frame_utils/_datagridtable.py +++ b/shiny/render/_data_frame_utils/_datagridtable.py @@ -90,7 +90,7 @@ class DataGrid(AbstractTabularData, Generic[DataFrameLikeT]): * `cols`: The column numbers to which the style should be applied. If `None`, the style will be applied to all columns. * `style`: A dictionary of CSS properties and values to apply to the selected - rows and columns. Traditional _kebab-cased_ CSS property names (e.g. + rows and columns. Traditional _kebab-cased_ CSS property names (e.g. `background-color`) will work in addition to _camelCased_ CSS property names (e.g. `backgroundColor`). * `class`: A string of CSS class names to apply to the selected rows and columns. @@ -249,7 +249,7 @@ class DataTable(AbstractTabularData, Generic[DataFrameLikeT]): * `cols`: The column numbers to which the style should be applied. If `None`, the style will be applied to all columns. * `style`: A dictionary of CSS properties and values to apply to the selected - rows and columns. Traditional _kebab-cased_ CSS property names (e.g. + rows and columns. Traditional _kebab-cased_ CSS property names (e.g. `background-color`) will work in addition to _camelCased_ CSS property names (e.g. `backgroundColor`). * `class`: A string of CSS class names to apply to the selected rows and columns.