Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove 'box-sizing: content-box' for wildcard selector #616

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions css/khan-exercise.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#problem-and-answer * {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.exercise, .vars, #next { display: none; }
p.question { font-weight: bold; }
var { font-style: normal; }
Expand Down Expand Up @@ -54,7 +49,13 @@ div.definition {
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
#problem_area_wrap { -webkit-flex: 1 0 1%; flex: 1 0 1%; overflow: auto; min-width: 1px; }
#problem_area_wrap {
-webkit-flex: 1 0 1%;
flex: 1 0 1%;
position: relative;
overflow: auto;
min-width: 1px;
}
#answer_area_wrap { width: 300px; }
@media (max-width: 1023px) {
#answer_area_wrap { width: 100%; }
Expand Down Expand Up @@ -114,10 +115,9 @@ body.debug .graphie { outline: 1px dashed red; }
left: 0;
top: 0;
z-index: 2;
width: calc(100% - 40px);
height: calc(100% - 40px - 25px);
width: 100%;
height: 100%;
display: none;
padding: 20px;
}
#scratchpad > div {
border: 1px solid #ccc;
Expand All @@ -134,7 +134,7 @@ body.debug .graphie { outline: 1px dashed red; }

#answer_area .answer-buttons input.simple-button,
#answer_area input.simple-button.full-width {
width: 92%;
width: 100%;
}
#answer_area #answercontent { position: relative; z-index: 3; }
#answer_area .hint-box { position: relative; z-index: 2;}
Expand Down Expand Up @@ -243,6 +243,9 @@ body.debug .graphie { outline: 1px dashed red; }
padding: 10px 10px 0;
border-top: 1px solid #fff;
position: relative;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
#positive-reinforcement img {
width: 28px;
Expand Down
10 changes: 5 additions & 5 deletions interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ _.extend(Exercises, {
guessLog: undefined,
userActivityLog: undefined
});
var hintCanVibration = true;
var hintCanVibration = true;
var waitForVibration = false;
var firstTimeWrong = true;
var PerseusBridge = Exercises.PerseusBridge,
Expand Down Expand Up @@ -330,8 +330,8 @@ function handleAttempt(data) {
setTimeout(function() {
waitForVibration = false;
hintCanVibration = true;
},1500);
}
},1500);
}

// Is this a message to be shown?
if (score.message != null) {
Expand Down Expand Up @@ -464,7 +464,7 @@ function onHintShown(e, data) {
if (hintsUsed === numHints) {
$("#hint").attr("disabled", true);
$(Exercises).trigger("allHintsUsed");

if (userExercise.exerciseStates.struggling) {
if (hintCanVibration === true) {
hintCanVibration = false;
Expand Down Expand Up @@ -623,7 +623,7 @@ function request(method, data) {
if (hint_disabled === "disabled") {
if (hintCanVibration === true) {
hintCanVibration = false;
$("#raise-hand-button").effect("shake", {times: 3, distance: 5}, 480);
$("#raise-hand-button-container").effect("shake", {times: 3, distance: 5}, 480);
}
}
else {
Expand Down
1 change: 0 additions & 1 deletion khan-exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ var Khan = (function() {
}

var makeVisible = function() {
$("#workarea, #hintsarea").css("padding-top", 50);
$("#scratchpad").show();
$("#scratchpad-show").text("隱藏計算紙");

Expand Down