Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

counter-reset defaults to 0, not 1. #8321

Merged
merged 2 commits into from Nov 4, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

counter-reset defaults to 0, not 1.

  • Loading branch information
SimonSapin committed Nov 4, 2015
commit 80dbd295282575b6b84fd8172b4230b4060209dc
@@ -1305,6 +1305,10 @@ pub mod longhands {
}

pub fn parse(_: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue,()> {
parse_common(1, input)
}

pub fn parse_common(default_value: i32, input: &mut Parser) -> Result<SpecifiedValue,()> {
if input.try(|input| input.expect_ident_matching("none")).is_ok() {
return Ok(SpecifiedValue(Vec::new()))
}
@@ -1320,7 +1324,7 @@ pub mod longhands {
return Err(())
}
let counter_delta =
input.try(|input| specified::parse_integer(input)).unwrap_or(1);
input.try(|input| specified::parse_integer(input)).unwrap_or(default_value);
counters.push((counter_name, counter_delta))
}

@@ -1334,7 +1338,11 @@ pub mod longhands {

<%self:longhand name="counter-reset">
pub use super::counter_increment::{SpecifiedValue, computed_value, get_initial_value};
pub use super::counter_increment::{parse};
use super::counter_increment::{parse_common};

pub fn parse(_: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue,()> {
parse_common(0, input)
}
</%self:longhand>

// CSS 2.1, Section 13 - Paged media

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -9,9 +9,6 @@
[subtest #22 with `--a: var(--b,orange)var(--c); --c:red;`]
expected: FAIL

[subtest #23 with `counter-reset: var(--a)red; --a:orange;`]
expected: FAIL

[subtest #24 with `--a: var(--b)var(--c); --c:[c\]; --b:('ab`]
expected: FAIL

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.