File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -280,6 +280,6 @@ button {
280
280
--color-dark : # fff ;
281
281
--additional-text : # ddd ;
282
282
--square-bg : rgb (32 , 99 , 255 );
283
- --count-color : # 000 ;
283
+ --count-color : # fff ;
284
284
--squareRoot-bg : rgb (7 , 69 , 184 );
285
285
}
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const value = document.getElementById("count");
7
7
const buttons = document . querySelectorAll ( ".btn" ) ;
8
8
const square = document . getElementById ( "square" ) ;
9
9
const squareRoot = document . getElementById ( "squareRoot" ) ;
10
+ const container = document . querySelector ( ".container" ) ;
10
11
11
12
buttons . forEach ( function ( item ) {
12
13
item . addEventListener ( "click" , function ( e ) {
@@ -34,7 +35,11 @@ buttons.forEach(function (item) {
34
35
squareRoot . style . display = "block" ;
35
36
document . getElementById ( "error" ) . style . display = "none" ;
36
37
} else {
37
- value . style . color = "currentColor" ;
38
+ if ( container . classList . contains ( "body-dark" ) ) {
39
+ value . style . color = "white" ;
40
+ } else {
41
+ value . style . color = "currentColor" ;
42
+ }
38
43
document . getElementById ( "error" ) . style . display = "none" ;
39
44
}
40
45
You can’t perform that action at this time.
0 commit comments