Skip to content

Commit

Permalink
Rename CSS classes to match naming conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
donnapep committed Sep 8, 2023
1 parent a1f305e commit 095d596
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions assets/blocks/quiz/question-block/question.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ $question-input-border-color: var(--wp--preset--color--foreground, #155E65 );
line-height: 1;
}
}
.submitted_file {

.wp-block-sensei-lms-question-answers__filename {
margin-bottom: 20px;
}

.submitted_image_file {
.wp-block-sensei-lms-question-answers__preview {
max-height: 480px;
}
}
Expand Down
4 changes: 2 additions & 2 deletions assets/css/3rd-party/themes/course/quiz.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

.wp-block-sensei-lms-quiz {
.wp-block-sensei-lms-question-answers {
.sensei_quiz_question_user_text_answer {
.wp-block-sensei-lms-question-answers__answer {
color: $gray-50;
}

.submitted_image_file {
.wp-block-sensei-lms-question-answers__preview {
border-radius: 4px;
border: 1px solid var(--wp--preset--color--foreground);
}
Expand Down
4 changes: 2 additions & 2 deletions assets/css/sensei-course-theme/quiz-compat.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $textColor: #1E1E1E;
font-size: 1.125rem;
}

.submitted_file {
.wp-block-sensei-lms-question-answers__filename {
font-size: 18px;
font-style: normal;
font-weight: 400;
Expand All @@ -35,7 +35,7 @@ $textColor: #1E1E1E;
}
}

.sensei_quiz_question_user_text_answer {
.wp-block-sensei-lms-question-answers__answer {
color: $gray-50;
}
}
Expand Down
4 changes: 2 additions & 2 deletions templates/single-quiz/question-type-file-upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<?php if ( $question_data['answer_media_url'] && $question_data['answer_media_filename'] ) { ?>

<p class="submitted_file">
<p class="wp-block-sensei-lms-question-answers__filename">

<?php
printf(
Expand All @@ -51,7 +51,7 @@
</p>

<?php if ( $sensei_is_quiz_view_only_mode && getimagesize( $question_data['answer_media_url'] ) ) { ?>
<img src="<?php echo esc_url( $question_data['answer_media_url'] ); ?>" class="submitted_image_file" />
<img src="<?php echo esc_url( $question_data['answer_media_url'] ); ?>" class="wp-block-sensei-lms-question-answers__preview" />
<?php } ?>

<?php if ( ! $question_data['quiz_is_completed'] ) { ?>
Expand Down
2 changes: 1 addition & 1 deletion templates/single-quiz/question-type-gap-fill.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<span class="gapfill-answer-pre">
<?php echo wp_kses_post( apply_filters( 'sensei_answer_text', esc_html( $question_data['gapfill_pre'] ) ) ); ?>
<?php if ( $sensei_is_quiz_view_only_mode ) { ?>
<span class="sensei_quiz_question_user_text_answer">
<span class="wp-block-sensei-lms-question-answers__answer">
<?php echo wp_kses_post( $question_data['user_answer_entry'] ); ?>
</span>
<?php } else { ?>
Expand Down
2 changes: 1 addition & 1 deletion templates/single-quiz/question-type-multi-line.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

if ( $sensei_is_quiz_view_only_mode ) {
?>
<div class="sensei_quiz_question_user_text_answer">
<div class="wp-block-sensei-lms-question-answers__answer">
<?php echo wp_kses_post( $question_data['user_answer_entry'] ); ?>
</div>
<?php
Expand Down
2 changes: 1 addition & 1 deletion templates/single-quiz/question-type-single-line.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div class="answer">

<?php if ( $sensei_is_quiz_view_only_mode ) { ?>
<div class="sensei_quiz_question_user_text_answer">
<div class="wp-block-sensei-lms-question-answers__answer">
<?php echo wp_kses_post( $question_data['user_answer_entry'] ); ?>
</div>
<?php } else { ?>
Expand Down

0 comments on commit 095d596

Please sign in to comment.