| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ Label { | |||
| 9 | 9 | } | |
| 10 | 10 | ||
| 11 | 11 | #s1 { | |
| 12 | - border-width: 5; border-color: red; | ||
| 12 | + border-width: 5; border-color: rgba(255,0,0,1); | ||
| 13 | 13 | } | |
| 14 | 14 | ||
| 15 | 15 | #s2 { | |
@@ -25,7 +25,7 @@ Label { | |||
| 25 | 25 | } | |
| 26 | 26 | ||
| 27 | 27 | #s5 { | |
| 28 | - border-width: 5 10 15 20; border-color: red; | ||
| 28 | + border-width: 5 10 15 20; border-color: rgb(255, 0, 0); | ||
| 29 | 29 | } | |
| 30 | 30 | ||
| 31 | 31 | #s6 { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -81,6 +81,14 @@ export function test_setting_borderColor_property_from_CSS_is_applied_to_Style() | |||
| 81 | 81 | test_property_from_CSS_is_applied_to_style("borderColor", "border-color", new color.Color("#FF0000"), "#FF0000"); | |
| 82 | 82 | } | |
| 83 | 83 | ||
| 84 | + export function test_setting_borderColorRGB_property_from_CSS_is_applied_to_Style() { | ||
| 85 | + test_property_from_CSS_is_applied_to_style("borderColor", "border-color", new color.Color("#FF0000"), "rgb(255, 0, 0)"); | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + export function test_setting_borderColorRGBA_property_from_CSS_is_applied_to_Style() { | ||
| 89 | + test_property_from_CSS_is_applied_to_style("borderColor", "border-color", new color.Color("#FF0000"), "rgba(255,0,0,1)"); | ||
| 90 | + } | ||
| 91 | + | ||
| 84 | 92 | export function test_setting_borderRadius_property_from_CSS_is_applied_to_Style() { | |
| 85 | 93 | test_property_from_CSS_is_applied_to_style("borderRadius", "border-radius", 20); | |
| 86 | 94 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1613,6 +1613,11 @@ function parseBorderColor(value: any): definition.BorderColor { | |||
| 1613 | 1613 | var result: definition.BorderColor = { top: undefined, right: undefined, bottom: undefined, left: undefined }; | |
| 1614 | 1614 | try { | |
| 1615 | 1615 | if (types.isString(value)) { | |
| 1616 | + if (value.indexOf("rgb") === 0){ | ||
| 1617 | + result.top = result.right = result.bottom = result.left = new Color(value); | ||
| 1618 | + return result; | ||
| 1619 | + } | ||
| 1620 | + | ||
| 1616 | 1621 | let arr = value.split(/[ ,]+/); | |
| 1617 | 1622 | if (arr.length === 1){ | |
| 1618 | 1623 | let arr0 = new Color(arr[0]); | |
@@ -1650,11 +1655,11 @@ function parseBorderColor(value: any): definition.BorderColor { | |||
| 1650 | 1655 | } | |
| 1651 | 1656 | } | |
| 1652 | 1657 | else if (value instanceof Color) { | |
| 1653 | - result.top = result.right = result.bottom = result.left = value; | ||
| 1654 | - } | ||
| 1655 | - else { | ||
| 1656 | - result = value; | ||
| 1657 | - } | ||
| 1658 | + result.top = result.right = result.bottom = result.left = value; | ||
| 1659 | + } | ||
| 1660 | + else { | ||
| 1661 | + result = value; | ||
| 1662 | + } | ||
| 1658 | 1663 | } | |
| 1659 | 1664 | catch(ex){ | |
| 1660 | 1665 | if (trace.enabled) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments