Advertisement
adolphuZ

Untitled

Jun 5th, 2024
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1. class CssStyleDecorator(CssStyle):
  2.     def __init__(self, style):
  3.         self.style = style
  4.  
  5.     def render(self):
  6.         return self.style.render()
  7.  
  8. class ColoredDivStyle(CssStyleDecorator):
  9.     def render(self):
  10.         return "div.styled-div { margin: 10px; border: 1px solid #000; }\n"
  11.  
  12. class ColoredLabelStyle(CssStyleDecorator):
  13.     def render(self):
  14.         return "label.styled-label { font-size: 14px; color: #FF5733; }\n"
  15.  
  16. class ColoredInputStyle(CssStyleDecorator):
  17.     def render(self):
  18.         return "input.styled-input[type='text'] { padding: 5px; border: 2px solid #4CAF50; }\n"
  19.  
  20. class ColoredSelectStyle(CssStyleDecorator):
  21.     def render(self):
  22.         return "select.styled-select { width: 100px; border: 1px solid #333; }\n"
  23.  
  24. class ColoredSubmitStyle(CssStyleDecorator):
  25.     def render(self):
  26.         return "input.styled-submit[type='submit'] { background-color: #4CAF50; color: white; padding: 10px; }\n"
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement