This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25476 - want to add @counter-style decimal-zero-padded
Summary: want to add @counter-style decimal-zero-padded
Status: RESOLVED INVALID
Alias: None
Product: CSS
Classification: Unclassified
Component: Counter Styles (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Tab Atkins Jr.
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-26 10:17 UTC by Jim Michaels
Modified: 2014-04-27 20:41 UTC (History)
0 users

See Also:


Attachments

Description Jim Michaels 2014-04-26 10:17:42 UTC
@counter-style decimal-zero-padded-0-width {
	system: numeric;
	pad: 0 "0";
	symbols: '\30' '\31' '\32' '\33' '\34' '\35' '\36' '\37' '\38' '\39';
	/* symbols: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9'; */
} 

@counter-style decimal-space-padded-0-width {
	system: numeric;
	pad: 0 " ";
	symbols: '\30' '\31' '\32' '\33' '\34' '\35' '\36' '\37' '\38' '\39';
	/* symbols: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9'; */
} 

@counter-style decimal-zero-padded-4-width {
	system: numeric;
	pad: 4 "0";
	symbols: '\30' '\31' '\32' '\33' '\34' '\35' '\36' '\37' '\38' '\39';
	/* symbols: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9'; */
} 

@counter-style decimal-space-padded-4-width {
	system: numeric;
	pad: 4 " ";
	symbols: '\30' '\31' '\32' '\33' '\34' '\35' '\36' '\37' '\38' '\39';
	/* symbols: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9'; */
}
Comment 1 Jim Michaels 2014-04-26 10:18:53 UTC
please add these to http://www.w3.org/TR/predefined-counter-styles/#digit-styles
Comment 2 Tab Atkins Jr. 2014-04-27 20:41:46 UTC
Any 'pad' with a 0 width has no effect, so the first two do nothing.

Why are the 4-width styles you present special over anything else?  Note that the Predefined Counter Styles spec isn't meant to be implemented by browsers; it's to provide useful predefined styles for authors to copy into their own stylesheets.

Also note that, since the styles are identical to 'decimal' except for their 'pad' value, you can define them as override styles more easily:

@counter-style decimal-zero-padded-4-width { 
  system: override decimal;
  pad: 4 "0";
}

etc.