File tree Expand file tree Collapse file tree 4 files changed +15
-1
lines changed
src/devtools/client/inspector Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ export async function createComputedProperties(
108
108
selectors . push ( {
109
109
value : property . value ,
110
110
parsedValue,
111
+ priority : property . priority ,
111
112
selector,
112
113
stylesheet,
113
114
stylesheetURL,
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export default function MatchedSelector(props: MatchedSelectorProps) {
30
30
colorSpanClassName = "computed-color"
31
31
colorSwatchClassName = "computed-colorswatch"
32
32
fontFamilySpanClassName = "computed-font-family"
33
+ priority = { selector . priority }
33
34
values = { selector . parsedValue }
34
35
/>
35
36
</ div >
Original file line number Diff line number Diff line change
1
+ import { Priority } from "../../rules/models/text-property" ;
2
+
1
3
export interface ComputedPropertyState {
2
4
name : string ;
3
5
value : string ;
@@ -9,6 +11,7 @@ export interface MatchedSelectorState {
9
11
selector : string ;
10
12
value : string ;
11
13
parsedValue : any [ ] ;
14
+ priority : Priority ;
12
15
overridden : boolean ;
13
16
stylesheet : string ;
14
17
stylesheetURL : string ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from "react";
2
2
3
3
import { COLOR , FONT_FAMILY , URI } from "third-party/css/output-parser" ;
4
4
5
+ import { Priority } from "../models/text-property" ;
5
6
import Color from "./value/Color" ;
6
7
import FontFamily from "./value/FontFamily" ;
7
8
import Url from "./value/Url" ;
@@ -10,12 +11,13 @@ interface DeclarationValueProps {
10
11
colorSpanClassName : string ;
11
12
colorSwatchClassName : string ;
12
13
fontFamilySpanClassName : string ;
14
+ priority ?: Priority ;
13
15
values : ( string | Record < string , string > ) [ ] ;
14
16
}
15
17
16
18
class DeclarationValue extends React . PureComponent < DeclarationValueProps > {
17
19
render ( ) {
18
- return this . props . values . map ( v => {
20
+ const values = this . props . values . map ( v => {
19
21
if ( typeof v === "string" ) {
20
22
return v ;
21
23
}
@@ -46,6 +48,13 @@ class DeclarationValue extends React.PureComponent<DeclarationValueProps> {
46
48
47
49
return value ;
48
50
} ) ;
51
+
52
+ return (
53
+ < >
54
+ { values }
55
+ { this . props . priority ? ` !${ this . props . priority } ` : null }
56
+ </ >
57
+ ) ;
49
58
}
50
59
}
51
60
You can’t perform that action at this time.
0 commit comments