Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.

Commit f9dbd05

Browse files
authored
Merge pull request #81 from yashsehgal/v2.0
Tests added to check CSS Properties
2 parents 0693374 + 90c7a8c commit f9dbd05

6 files changed

Lines changed: 108 additions & 11 deletions

File tree

src/lib/eccentric.css

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/eccentric.css.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/eccentric.scss

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ body {
7474
line-height: inherit;
7575
}
7676

77+
button:focus {
78+
outline: none;
79+
border: none;
80+
}
81+
7782
.et-button-danger, .et-button-invalid {
7883
color: white;
7984
background-color: var(--et-danger);
@@ -121,44 +126,44 @@ body {
121126
color: var(--et-black);
122127
border: var(--et-black) solid;
123128
border-width: 2px;
124-
129+
}
125130
// Heading Method - Combined button Property
126131

127-
h1,.et-h1,h2,.et-h2,h3,.et-h3,h4,.et-h4,h5,.et-h5,h6,.et-h6{
132+
h1, .et-h1, h2, .et-h2, h3, .et-h3, h4, .et-h4, h5, .et-h5, h6, .et-h6 {
128133
font-family: var(--et-sans-serif);
129134
color: var(--et-black);
130135
margin: 0;
131136
}
132137

133138
// heading method - (h1)
134-
h1, .et-h1{
139+
h1, .et-h1 {
135140
font-size: 45.3px;
136141
font-weight: 600;
137142
}
138143

139144
// heading method - (h2)
140-
h2, .et-h2{
145+
h2, .et-h2 {
141146
font-size: 38.3px;
142147
}
143148

144149
// heading method - (h3)
145-
h3, .et-h3{
150+
h3, .et-h3 {
146151
font-size: 29.12px;
147152
font-weight: 600;
148153
}
149154

150155
// heading method - (h4)
151-
h4, .h4{
156+
h4, .h4 {
152157
font-size: 22.65px;
153158
}
154159

155160
// heading method - (h5)
156-
h5, .et-h5{
161+
h5, .et-h5 {
157162
font-size: 16.18px;
158163
font-weight: 600;
159164
}
160165

161166
// heading method - (h6)
162-
h6, .et-h6{
167+
h6, .et-h6 {
163168
font-size: 12.94px;
164169
}

src/tests/auto/TEST_RESULTS.htm

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<link rel="stylesheet" href="../../lib/eccentric.css">
8+
<title>TEST RESULTS</title>
9+
</head>
10+
<body>
11+
<div id="root-tester-buttons"></div> <!--BUTTONS TEST DATA-->
12+
13+
<div id="root-tester-fonts"></div>
14+
15+
<script src="__BUTTON_TESTS.js"></script>
16+
<script src="__FONT_TESTS.js"></script>
17+
</body>
18+
</html>

src/tests/auto/__BUTTON_TESTS.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
__BUTTON__TESTS = [
3+
{
4+
"classname": "et-button"
5+
},
6+
{
7+
"classname": "et-primaryButton"
8+
},
9+
{
10+
"classname": "et-button-danger"
11+
},
12+
{
13+
"classname": "et-button-invalid"
14+
},
15+
{
16+
"classname": "et-button-success"
17+
},
18+
{
19+
"classname": "et-button-valid"
20+
},
21+
{
22+
"classname": "et-button-warning"
23+
}
24+
]
25+
26+
let BUTTON_TEST_DATA = document.createElement("div");
27+
28+
/// RUNNING TESTS
29+
for (let testOperation in __BUTTON__TESTS) {
30+
let _testable_button__ = document.createElement("button");
31+
_testable_button__.innerHTML = "Testing Buttons";
32+
_testable_button__.className = __BUTTON__TESTS[testOperation].classname;
33+
BUTTON_TEST_DATA.append(_testable_button__);
34+
}
35+
36+
document.getElementById("root-tester-buttons").appendChild(BUTTON_TEST_DATA);

src/tests/auto/__FONT_TESTS.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
__FONTS__TESTS = [
3+
{
4+
"classname": "et-h1"
5+
},
6+
{
7+
"classname": "et-h2"
8+
},
9+
{
10+
"classname": "et-h3"
11+
},
12+
{
13+
"classname": "et-h4"
14+
},
15+
{
16+
"classname": "et-h5"
17+
},
18+
{
19+
"classname": "et-h6"
20+
}
21+
]
22+
23+
let FONTS_TEST_DATA = document.createElement("div");
24+
25+
/// RUNNING TESTS
26+
for (let testOperation in __FONTS__TESTS) {
27+
let _testable_font__ = document.createElement("p");
28+
_testable_font__.innerHTML = "Testing Buttons";
29+
_testable_font__.className = __FONTS__TESTS[testOperation].classname;
30+
FONTS_TEST_DATA.append(_testable_font__);
31+
}
32+
33+
document.getElementById("root-tester-fonts").appendChild(FONTS_TEST_DATA);

0 commit comments

Comments
 (0)