Skip to content

Commit 67dd614

Browse files
saumya1906catarak
authored andcommitted
Issue 266: Sketch Settings design
1 parent 6b6ff7c commit 67dd614

File tree

2 files changed

+65
-43
lines changed

2 files changed

+65
-43
lines changed

client/modules/IDE/components/Preferences.jsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ class Preferences extends React.Component {
7575
<Tabs>
7676
<TabList>
7777
<div className="preference__subheadings">
78-
<Tab><h4 className="preference__subheading1">General Settings</h4></Tab>
79-
<h4 className="preference__subheading2">Sketch Settings</h4>
80-
<Tab><h4 className="preference__subheading2">Accessibility</h4></Tab>
78+
<Tab><h4 className="preference__subheading">General Settings</h4></Tab>
79+
<Tab><h4 className="preference__subheading">Sketch Settings</h4></Tab>
80+
<Tab><h4 className="preference__subheading">Accessibility</h4></Tab>
8181
</div>
8282
</TabList>
8383
<TabPanel>
@@ -235,6 +235,15 @@ class Preferences extends React.Component {
235235
</div>
236236
</div>
237237
</TabPanel>
238+
<TabPanel>
239+
<br></br>
240+
<div className="preference">
241+
<h4 className="preference__title">Add a p5.js or an external library</h4>
242+
<h4 className="preference__sketch1">Add a script library resource field</h4>
243+
<h4 className="preference__title">Security Protocol</h4>
244+
<h4>Serve over HTTPS</h4>
245+
</div>
246+
</TabPanel>
238247
<TabPanel>
239248
<div className="preference">
240249
<h4 className="preference__title">Accessible text-based canvas</h4>

client/styles/components/_preferences.scss

Lines changed: 53 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
display: flex;
4646
flex-direction: row;
4747
justify-content: space-between;
48-
marhin-left: #{19 / $base-font-size}rem;
4948
@include themify() {
5049
color: getThemifyVariable('heading-text-color');
5150
}
@@ -69,7 +68,6 @@
6968
}
7069
}
7170

72-
7371
.preference {
7472
display: flex;
7573
flex-wrap: wrap;
@@ -129,7 +127,7 @@
129127
width: #{44 / $base-font-size}rem;
130128
}
131129

132-
.preference__subheading1 {
130+
.preference__subheading {
133131
@include themify() {
134132
color: getThemifyVariable('inactive-text-color');
135133
&:hover {
@@ -139,47 +137,12 @@
139137
}
140138
font-size: #{12 / $base-font-size}rem;
141139
height: #{25 / $base-font-size}rem;
142-
text-align: left;
143140
margin-top: #{30 / $base-font-size}rem;
144141
margin-left: #{5 / $base-font-size}rem;
145142
margin-bottom: #{0.1 / $base-font-size}rem;
143+
margin-right: #{60 / $base-font-size}rem;
146144
font-family: Montserrat;
147-
width: #{100 / $base-font-size}rem;
148-
}
149-
150-
.preference__subheading2 {
151-
@include themify() {
152-
color: getThemifyVariable('inactive-text-color');
153-
&:hover {
154-
color: getThemifyVariable('primary-text-color');
155-
border-bottom: #{4 / $base-font-size}rem solid getThemifyVariable('button-background-hover-color');
156-
}
157-
}
158-
font-size: #{12 / $base-font-size}rem;
159-
height: #{25 / $base-font-size}rem;
160-
text-align: left;
161-
margin-top: #{30 / $base-font-size}rem;
162-
margin-left: #{46 / $base-font-size}rem;
163-
margin-bottom: #{0.1 / $base-font-size}rem;
164-
font-family: Montserrat;
165-
}
166-
167-
.preference__subheading3 {
168-
@include themify() {
169-
color: getThemifyVariable('inactive-text-color');
170-
&:hover {
171-
color: getThemifyVariable('primary-text-color');
172-
border-bottom: #{4 / $base-font-size}rem solid getThemifyVariable('button-background-hover-color');
173-
}
174-
}
175-
font-size: #{12 / $base-font-size}rem;
176-
height: #{25 / $base-font-size}rem;
177-
text-align: left;
178-
margin-top: #{30 / $base-font-size}rem;
179-
margin-left: #{48 / $base-font-size}rem;
180-
margin-bottom: #{0.1 / $base-font-size}rem;
181-
width: #{78 / $base-font-size}rem;
182-
font-family: Montserrat;
145+
width: #{98 / $base-font-size}rem;
183146
}
184147

185148
.preference__vertical-list {
@@ -189,6 +152,22 @@
189152
padding-left: #{25 / $base-font-size}rem;
190153
}
191154

155+
.preference__sketch1{
156+
width: #{601 / $base-font-size}rem;
157+
height: #{100 / $base-font-size}rem;
158+
font-family: Montserrat;
159+
font-size: #{14 / $base-font-size}rem;
160+
line-height: 1.43;
161+
text-align: left;
162+
margin-left: #{5 / $base-font-size}rem;
163+
margin-top: #{40 / $base-font-size}rem;
164+
margin-bottom: #{10 / $base-font-size}rem;
165+
@include themify() {
166+
color: getThemifyVariable('inactive-text-color');
167+
border-bottom: 1px dashed getThemifyVariable('button-border-color');
168+
}
169+
}
170+
192171
.preference__radio-button {
193172
@extend %hidden-element;
194173
}
@@ -228,3 +207,37 @@
228207
.preference__option.preference__canvas:not(:last-child) {
229208
padding-right: #{14 / $base-font-size}rem;
230209
}
210+
211+
/*.tooltip {
212+
display: inline-block;
213+
}
214+
215+
/* Tooltip text */
216+
/*.tooltip .tooltiptext {
217+
margin-top: #{0 / $base-font-size}rem;
218+
margin-bottom: #{50 / $base-font-size}rem;
219+
margin-left: #{130 / $base-font-size}rem;
220+
visibility: hidden;
221+
width: 120px;
222+
height: 120px;
223+
border-color: $p5js-pink transparent transparent $p5js-pink;
224+
padding: 5px 0;
225+
border-radius: 5px;
226+
webkit-border-radius: 20px;
227+
moz-border-radius: 20px;
228+
text-align: center;
229+
color: $white;
230+
background-color: $p5js-pink;
231+
vertical-align: top;
232+
/* Position the tooltip text - see examples below! */
233+
/* content: ' ';
234+
position: absolute;
235+
left: #{15 / $base-font-size}rem;
236+
-webkit-margin-before: 0em;
237+
-webkit-margin-after: 0em;
238+
}
239+
240+
/* Show the tooltip text when you mouse over the tooltip container */
241+
/*.tooltip:hover .tooltiptext {
242+
visibility: visible;
243+
}*//*/*/

0 commit comments

Comments
 (0)