Skip to content

Commit d87ee22

Browse files
update Tailwind links to point to version 3
1 parent 367b840 commit d87ee22

File tree

8 files changed

+12
-11
lines changed

8 files changed

+12
-11
lines changed

nicegui/classes.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __call__(self,
1919
replace: Optional[str] = None) -> T:
2020
"""Apply, remove, toggle, or replace HTML classes.
2121
22-
This allows modifying the look of the element or its layout using `Tailwind <https://tailwindcss.com/>`_ or `Quasar <https://quasar.dev/>`_ classes.
22+
This allows modifying the look of the element or its layout using `Tailwind <https://v3.tailwindcss.com/>`_ or `Quasar <https://quasar.dev/>`_ classes.
2323
2424
Removing or replacing classes can be helpful if predefined classes are not desired.
2525
@@ -28,6 +28,7 @@ def __call__(self,
2828
:param toggle: whitespace-delimited string of classes to toggle (*added in version 2.7.0*)
2929
:param replace: whitespace-delimited string of classes to use instead of existing ones
3030
"""
31+
# DEPRECATED: replace Tailwind v3 link with v4 (throughout the whole codebase!) after upgrading in NiceGUI 3.0
3132
new_classes = self.update_list(self, add, remove, toggle, replace)
3233
if self != new_classes:
3334
self[:] = new_classes

nicegui/element.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def default_classes(cls,
226226
replace: Optional[str] = None) -> type[Self]:
227227
"""Apply, remove, toggle, or replace default HTML classes.
228228
229-
This allows modifying the look of the element or its layout using `Tailwind <https://tailwindcss.com/>`_ or `Quasar <https://quasar.dev/>`_ classes.
229+
This allows modifying the look of the element or its layout using `Tailwind <https://v3.tailwindcss.com/>`_ or `Quasar <https://quasar.dev/>`_ classes.
230230
231231
Removing or replacing classes can be helpful if predefined classes are not desired.
232232
All elements of this class will share these HTML classes.

nicegui/element_filter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def not_within(self, *,
193193
def classes(self, add: Optional[str] = None, *, remove: Optional[str] = None, replace: Optional[str] = None) -> Self:
194194
"""Apply, remove, or replace HTML classes.
195195
196-
This allows modifying the look of the element or its layout using `Tailwind <https://tailwindcss.com/>`_ or `Quasar <https://quasar.dev/>`_ classes.
196+
This allows modifying the look of the element or its layout using `Tailwind <https://v3.tailwindcss.com/>`_ or `Quasar <https://quasar.dev/>`_ classes.
197197
198198
Removing or replacing classes can be helpful if predefined classes are not desired.
199199

nicegui/elements/html.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def __init__(self, content: str = '', *, tag: str = 'div') -> None:
77
"""HTML Element
88
99
Renders arbitrary HTML onto the page, wrapped in the specified tag.
10-
`Tailwind <https://tailwindcss.com/>`_ can be used for styling.
10+
`Tailwind <https://v3.tailwindcss.com/>`_ can be used for styling.
1111
You can also use `ui.add_head_html` to add html code into the head of the document and `ui.add_body_html`
1212
to add it into the body.
1313

nicegui/elements/query.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def classes(self,
4545
) -> Self:
4646
"""Apply, remove, toggle, or replace HTML classes.
4747
48-
This allows modifying the look of the element or its layout using `Tailwind <https://tailwindcss.com/>`_ or `Quasar <https://quasar.dev/>`_ classes.
48+
This allows modifying the look of the element or its layout using `Tailwind <https://v3.tailwindcss.com/>`_ or `Quasar <https://quasar.dev/>`_ classes.
4949
5050
Removing or replacing classes can be helpful if predefined classes are not desired.
5151

website/documentation/content/grid_documentation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def custom_demo() -> None:
3636
@doc.demo('Cells spanning multiple columns', '''
3737
This demo shows how to span cells over multiple columns.
3838
39-
Note that there is [no Tailwind class for spanning 15 columns](https://tailwindcss.com/docs/grid-column),
40-
but we can set [arbitrary values](https://tailwindcss.com/docs/grid-column#arbitrary-values) using square brackets.
39+
Note that there is [no Tailwind class for spanning 15 columns](https://v3.tailwindcss.com/docs/grid-column#arbitrary-values),
40+
but we can set [arbitrary values](https://v3.tailwindcss.com/docs/grid-column#arbitrary-values) using square brackets.
4141
Alternatively you could use the corresponding CSS definition: `.style('grid-column: span 15 / span 15')`.
4242
''')
4343
def span_demo() -> None:

website/documentation/content/section_styling_appearance.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
Each NiceGUI element provides a `props` method whose content is passed [to the Quasar component](https://justpy.io/quasar_tutorial/introduction/#props-of-quasar-components):
1919
Have a look at [the Quasar documentation](https://quasar.dev/vue-components/button#design) for all styling props.
2020
Props with a leading `:` can contain JavaScript expressions that are evaluated on the client.
21-
You can also apply [Tailwind CSS](https://tailwindcss.com/) utility classes with the `classes` method.
21+
You can also apply [Tailwind CSS](https://v3.tailwindcss.com/) utility classes with the `classes` method.
2222
2323
If you really need to apply CSS, you can use the `style` method. Here the delimiter is `;` instead of a blank space.
2424
@@ -32,7 +32,7 @@ def design_demo():
3232

3333
doc.text('Try styling NiceGUI elements!', '''
3434
Try out how
35-
[Tailwind CSS classes](https://tailwindcss.com/),
35+
[Tailwind CSS classes](https://v3.tailwindcss.com/),
3636
[Quasar props](https://justpy.io/quasar_tutorial/introduction/#props-of-quasar-components),
3737
and CSS styles affect NiceGUI elements.
3838
''')
@@ -105,7 +105,7 @@ def handle_style(e: events.ValueChangeEventArguments):
105105

106106

107107
@doc.demo('Tailwind CSS', '''
108-
[Tailwind CSS](https://tailwindcss.com/) is a CSS framework for rapidly building custom user interfaces.
108+
[Tailwind CSS](https://v3.tailwindcss.com/) is a CSS framework for rapidly building custom user interfaces.
109109
NiceGUI provides a fluent, auto-complete friendly interface for adding Tailwind classes to UI elements.
110110
111111
You can discover available classes by navigating the methods of the `tailwind` property.

website/main_page.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def create() -> None:
126126
'customizable [color themes](/documentation/section_styling_appearance#color_theming)',
127127
'custom CSS and classes',
128128
'modern look with material design',
129-
'[Tailwind CSS](https://tailwindcss.com/) auto-completion',
129+
'[Tailwind CSS](https://v3.tailwindcss.com/) auto-completion',
130130
])
131131
features('source', 'Coding', [
132132
'routing for multiple [pages](/documentation/page)',

0 commit comments

Comments
 (0)