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

fix: parse a-trules correctly in CSS #839

Merged
merged 2 commits into from
Nov 15, 2018
Merged

fix: parse a-trules correctly in CSS #839

merged 2 commits into from
Nov 15, 2018

Conversation

diervo
Copy link
Contributor

@diervo diervo commented Nov 15, 2018

Details

Fixes at media rules

In:

@media screen and (max-width: 768px) {
    :host {
        width: calc(50% - 1rem);
    }
}

Out:

function stylesheet(hostSelector, shadowSelector, nativeShadow) {
  return `
  @media screen and (max-width: 768px) {
    ${nativeShadow ? (":host {width: calc(50% - 1rem);}") : (hostSelector + " {width: calc(50% - 1rem);}")}
  }`;
}
export default [stylesheet];

@diervo diervo requested a review from pmdartus November 15, 2018 00:22
@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: 53df110 | Target commit: a256a5d

lwc-engine-benchmark

table-append-1k metric base(53df110) target(a256a5d) trend
benchmark-table/append/1k duration 153.05 (±4.50 ms) 154.10 (±4.20 ms) +1.0ms (0.7%) 👌
table-clear-1k metric base(53df110) target(a256a5d) trend
benchmark-table/clear/1k duration 6.50 (±0.40 ms) 6.80 (±0.30 ms) +0.3ms (4.6%) 👎
table-create-10k metric base(53df110) target(a256a5d) trend
benchmark-table/create/10k duration 935.20 (±6.95 ms) 933.40 (±6.80 ms) -1.8ms (0.2%) 👌
table-create-1k metric base(53df110) target(a256a5d) trend
benchmark-table/create/1k duration 119.40 (±2.45 ms) 119.10 (±3.15 ms) -0.3ms (0.3%) 👌
table-update-10th-1k metric base(53df110) target(a256a5d) trend
benchmark-table/update-10th/1k duration 79.00 (±3.15 ms) 79.90 (±2.55 ms) +0.9ms (1.1%) 👌
tablecmp-append-1k metric base(53df110) target(a256a5d) trend
benchmark-table-component/append/1k duration 260.55 (±6.10 ms) 261.45 (±4.80 ms) +0.9ms (0.3%) 👌
tablecmp-clear-1k metric base(53df110) target(a256a5d) trend
benchmark-table-component/clear/1k duration 12.05 (±1.80 ms) 12.60 (±1.40 ms) +0.5ms (4.6%) 👌
tablecmp-create-10k metric base(53df110) target(a256a5d) trend
benchmark-table-component/create/10k duration 1809.55 (±15.10 ms) 1850.75 (±9.65 ms) +41.2ms (2.3%) 👎
tablecmp-create-1k metric base(53df110) target(a256a5d) trend
benchmark-table-component/create/1k duration 213.15 (±5.30 ms) 217.10 (±5.40 ms) +4.0ms (1.9%) 👌
tablecmp-update-10th-1k metric base(53df110) target(a256a5d) trend
benchmark-table-component/update-10th/1k duration 73.40 (±5.35 ms) 75.35 (±7.15 ms) +1.9ms (2.7%) 👌
wc-append-1k metric base(53df110) target(a256a5d) trend
benchmark-table-wc/append/1k duration 257.25 (±11.35 ms) 267.00 (±14.30 ms) +9.8ms (3.8%) 👎
wc-clear-1k metric base(53df110) target(a256a5d) trend
benchmark-table-wc/clear/1k duration 25.45 (±2.50 ms) 24.40 (±2.25 ms) -1.1ms (4.1%) 👌
wc-create-10k metric base(53df110) target(a256a5d) trend
benchmark-table-wc/create/10k duration 1946.05 (±39.65 ms) 2038.75 (±69.05 ms) +92.7ms (4.8%) 👎
wc-create-1k metric base(53df110) target(a256a5d) trend
benchmark-table-wc/create/1k duration 234.05 (±5.80 ms) 239.70 (±4.85 ms) +5.6ms (2.4%) 👎
wc-update-10th-1k metric base(53df110) target(a256a5d) trend
benchmark-table-wc/update-10th/1k duration 76.60 (±6.10 ms) 81.20 (±6.20 ms) +4.6ms (6.0%) 👌

@diervo diervo merged commit 9c1da4d into master Nov 15, 2018
@diervo diervo deleted the dval/fixCSSMedia branch November 15, 2018 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants