Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: capricorn86/happy-dom
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v10.10.3
Choose a base ref
...
head repository: capricorn86/happy-dom
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v10.10.4
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Aug 18, 2023

  1. Copy the full SHA
    f87887a View commit details
  2. Merge branch 'master' into task/999-innerhtml-parser-interprets-in-un…

    …quoted-element-attributes-incorrectly
    capricorn86 authored Aug 18, 2023
    Copy the full SHA
    38f2e48 View commit details
  3. Merge pull request #1021 from capricorn86/task/999-innerhtml-parser-i…

    …nterprets-in-unquoted-element-attributes-incorrectly
    
    #999@patch: Adds support for calc() in CSS values.
    capricorn86 authored Aug 18, 2023
    Copy the full SHA
    9c92c1c View commit details
Original file line number Diff line number Diff line change
@@ -262,7 +262,7 @@ export default class CSSStyleDeclarationValueParser {
* @returns Parsed value.
*/
public static getMeasurement(value: string): string {
return this.getLength(value) || this.getPercentage(value);
return this.getLength(value) || this.getPercentage(value) || this.getCalc(value);
}

/**
Original file line number Diff line number Diff line change
@@ -2103,6 +2103,14 @@ describe('CSSStyleDeclaration', () => {

expect(declaration.width).toBe('0px');
});

it('Returns width for "width: calc(10% - 1px)".', () => {
const declaration = new CSSStyleDeclaration(element);

element.setAttribute('style', 'width: calc(10% - 1px)');

expect(declaration.width).toBe('calc(10% - 1px)');
});
});

describe('get height()', () => {