adosikas 1 year ago
parent
commit
99854b878e
2 changed files with 3 additions and 1 deletions
  1. 2 1
      nicegui/elements/color_input.py
  2. 1 0
      tests/test_color_input.py

+ 2 - 1
nicegui/elements/color_input.py

@@ -39,7 +39,8 @@ class ColorInput(ValueElement, DisableableElement):
         self.preview = preview
         if self.preview:
             self.button.style(f'background-color: {value or "#fff"}')
-            self.button.style('text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff, 1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff')
+            self.button.style(
+                'text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff, 1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff')
 
     def open_picker(self) -> None:
         """Open the color picker"""

+ 1 - 0
tests/test_color_input.py

@@ -16,6 +16,7 @@ def test_entering_color(screen: Screen):
     button = screen.selenium.find_element(By.CLASS_NAME, 'q-btn')
     assert button.value_of_css_property('background-color') == 'rgba(0, 17, 0, 1)'
 
+
 def test_picking_color(screen: Screen):
     ui.color_input(label='Color', on_change=lambda e: output.set_text(e.value))
     output = ui.label()