My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 223: CSS problem id
2 people starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  txprog
Closed:  Mar 2010


 
Reported by niemczyc...@gmail.com, Mar 31, 2010
With the lastest git, when i use CSS for a widget with id, all CSS apply on
all widgets

Ex : 
search = MTButton(id="play",label='Search', size=(350,60), pos=(40, 550))
w.add_widget(search)

box = MTButton(id="menu",label='The Box', size=(200,80), pos=(400, 680))
w.add_widget(box)

css : #play {
  #bg-color: rgb(34,208,16);
  bg-color: rgb(31,232,32);
  color: rgb(255,255,255);

  border-radius: 10;
  border-radius-precision: .35;
  border-color: rgb(67,253,48);
  draw-alpha-background: 0;
  font-size: 18;

  bg-color-down: rgb(208,16,34);
  border-color-down: rgb(253,48,67);
}

Full file is attached.


The CSS #play is use for all the code...

screen1.py
983 bytes   View   Download
music.css
626 bytes   View   Download
Mar 31, 2010
Project Member #1 txprog
Fixed in latest revision.

You've also a problem in your code, "id" property in a widget is designed to be uniq
through the whole instance of PyMT. If you intend to use the same "id" for many
widget, use "cls" attribute. (It's the same as id/class in HTML)

I've added a warning about reuse the same ID for multiple widget.
Status: Done
Owner: txprog
Labels: Milestone-0.4.1 Component-Core
Jul 2, 2010
Project Member #2 txprog
(No comment was entered for this change.)
Labels: Milestone-0.5

Powered by Google Project Hosting