Skip to content

Commit

Permalink
fix: allow any digit
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaRybkina committed Apr 27, 2023
1 parent 57f689a commit 3752d88
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/_rules/border.js
Expand Up @@ -25,7 +25,7 @@ export const borders = [
[/^border-([xy])-(.+)$/, handlerBorderStyle],
[/^border-([rltb])-(.+)$/, handlerBorderStyle],
[
/^border-([rltb])?-?\[([0-9])\]$/,
/^border-([rltb])?-?\[(\d+)\]$/,
handlerArbitraryBorderSize,
{
autocomplete: [
Expand Down
1 change: 1 addition & 0 deletions test/__snapshots__/border.js.snap
Expand Up @@ -53,6 +53,7 @@ exports[`border > supports divide borders between horizontal and stacked childre
exports[`border > supports setting arbitrary border width 1`] = `
"/* layer: default */
.border-\\\\[6\\\\]{border-width:6;}
.border-\\\\[66\\\\]{border-width:66;}
.border-b-\\\\[7\\\\]{border-bottom-width:7;}
.border-l-\\\\[7\\\\]{border-left-width:7;}
.border-r-\\\\[7\\\\]{border-right-width:7;}
Expand Down
2 changes: 1 addition & 1 deletion test/border.js
Expand Up @@ -25,7 +25,7 @@ describe("border", () => {
});

test("supports setting arbitrary border width", async (t) => {
const classes = ["border-[6]", "border-l-[7]", "border-r-[7]", "border-t-[7]", "border-b-[7]", "border-w-[7]", "border-[wow]"];
const classes = ["border-[66]", "border-[6]", "border-l-[7]", "border-r-[7]", "border-t-[7]", "border-b-[7]", "border-w-[7]", "border-[wow]"];

const { css } = await t.uno.generate(classes);

Expand Down

0 comments on commit 3752d88

Please sign in to comment.