Read, find, express, fix
PHP is a nice scripting language to learn. I'm still a beginner, so I read articles and tutorials which are made specifically for beginners. I found one such article written by Daryl L. L. Houston from Digital Web Magazine. I read it and find that the text on the page is quite unfriendly to my eyes. The small font is okay, but there are no spacing at all between the paragraphs and codes, making it hard for me to read line by line. Anyone, at least myself, can easily get lost tracing the lines. I'm not sure if this is an intended visual effect or something wrong with my copy of Mozilla Firefox, so I investigated and found this piece of code in the design.css file of the page:
#content p {
margin: 0;
}
Sigh, I decided to disable the page style, removing all the formatting and styles. I clicked the Page Style icon on the status bar and surprised to see the Print Preview icon on the popup. The alternative stylesheet of Digital Web Magazine is labeled as 'Print Preview'. At that time, I'm using my Phoenity theme, applied with the cute menus sub-skin. Somehow the codes implemented for the sub-skin is so good that it even iconise this menu item, also removing the radio character.
I've just discovered a bug on my own theme. Immediately, I found my mistake when reading the codes of the cute menus sub-skin. The code menuitem[label="value"] seems to be too aggressive, even affecting checkbox-type and radio-type menu items which logically shouldn't be iconic. The way to fix this is to change it to menuitem[label="value"]:not([type]). I take a look at the cutemenus.css file and sigh again. There are so many codes to be changed! It would be too strenuous to change every single instance one by one, not to mention the mess in the content of the file.
Fortunately, Regular Expression comes to the rescue. Using my text editor, I just make it find this expression:
menuitem\[label="([^"]+)"\]
This will match all values of the label attribute except the double quote character. Then, replace with this:
menuitem[label=""]:not([type])
Done. The bug is fixed, in Phoenity version 1.3.2, just released as of this writing.
Okay, back to my reading.
The article is now more readable, thanks to the commentators.
Labels: css
Previous Posts
About
cheeaun.com is the site of a Malaysian web developer and designer, Lim Chee Aun. He loves to babble about life, computers, design, internet and oranges. Read more...
Sponsors
cheeaun Notifo 2.0 looking pretty neat. Going to try it for next few days. # about 9 hours ago
Archives
- June 2004
- July 2004
- August 2004
- September 2004
- October 2004
- November 2004
- December 2004
- January 2005
- February 2005
- March 2005
- April 2005
- May 2005
- June 2005
- July 2005
- August 2005
- September 2005
- October 2005
- November 2005
- December 2005
- January 2006
- April 2006
- May 2006
- June 2006
- July 2006
- August 2006
- September 2006
- October 2006
- November 2006
- December 2006
- January 2007
- February 2007
- March 2007
- April 2007
- May 2007
- June 2007
- September 2007
- October 2007
- November 2007
- December 2007
- January 2008
- February 2008
- September 2008
People
- Aaron Spuler
- Alex Choong
- Ang Kew Leok
- Angeline Tan
- Arvid Axelsson
- Asa Dotzler
- Benjamin Leow
- Bernie Zimmermann
- B.K. Ong
- Chan Lilian
- Chan Ming Shern
- Cheah Chu Yeow
- Ching Yonghan
- Chris Neale
- Chris Pirillo
- Danny Foo
- Dave Shea
- David Tenser
- Elizabeth Chin
- Eric Meyer
- Heng Kee Seng
- Ian Hickson
- James Ooi
- Jeffrey Zeldman
- Jinny Wong
- Joe Clark
- Jon Hicks
- Kamal Fariz
- Kah Soon
- Ken Lynch
- Kenny Lee Jian Siong
- Kevin Gerich
- Khai Lee
- Khoo Kah Peng
- Kong Chung Hwa
- Kuhan Venugopal
- Kwan Will Sen
- Lars Kleinschmidt
- Liew Cheon Fong
- Lim Chze Hong
- Lucia Lai
- Lun
- Navin
- Neil Turner
- P.J.Kraaima
- Peter Tan
- Regin Larson
- Ryan Lim
- Saw Kee Wooi
- Scott Jarkoff
- Soo Chooi Leang
- Steven Garrity
- Tantek Çelik
- Teoh Hock Lye
- Tim Yang
Powered By
Believe it or not, this blog is powered by Blogger. Nothing else.
