Pārlūkot izejas kodu

Course Theme: Frontend improvements feature branch PR (#7324)

* Course theme: Update the styles of back to lesson button of quiz in learning mode (#7312)

* Fix font weight in gold variation

* Fix back to lesson font family in default variation

* Fix back to lesson font family in gold variation

* Fix back to lesson font family in blue variation

* Fix back to lesson font family in dark variation

* Quiz footer button styles fix (#7317)

* Fix font weight in gold variation

* Fix back to lesson font family in default variation

* Fix back to lesson font family in gold variation

* Fix back to lesson font family in blue variation

* Fix back to lesson font family in dark variation

* Fix default font size

* Fix gold variation font size

* Fix dark variation font size

* Fix blue variation font size

* Simply Quiz Actions block CSS

---------

Co-authored-by: Donna Peplinskie <donnapep@gmail.com>

* Update stylings for quiz, questions and answers (#7331)

* Fix font weight in gold variation

* Fix back to lesson font family in default variation

* Fix back to lesson font family in gold variation

* Fix back to lesson font family in blue variation

* Fix back to lesson font family in dark variation

* Fix default font size

* Fix gold variation font size

* Fix dark variation font size

* Fix blue variation font size

* Fix default variation question title font stylings

* Fix spacings above and below question title

* Add default style for file upload button

* Add question, title and file upload button styles for blue variation

* Add question, title and file upload button styles for dark variation

* Add question, title and file upload button styles for gold variation

* Update file upload placeholder spacings for all variations

* Further clarify CSS selector to prevent collisions

* Adjust question title CSS for Gold variation

* Set font family for quiz points in Gold variation

* Eliminate use of custom font size

* Remove obsolete CSS for file upload component

---------

Co-authored-by: Donna Peplinskie <donnapep@gmail.com>

---------

Co-authored-by: Imran Hossain <imran.hossain@automattic.com>
Co-authored-by: Donna Peplinskie <donnapep@gmail.com>
Imran Hossain 1 gadu atpakaļ
vecāks
revīzija
e88bb3eb7f
4 mainītis faili ar 105 papildinājumiem un 2 dzēšanām
  1. 22 0
      course/styles/blue.json
  2. 23 1
      course/styles/dark.json
  3. 23 0
      course/styles/gold.json
  4. 37 1
      course/theme.json

+ 22 - 0
course/styles/blue.json

@@ -279,6 +279,28 @@
 			},
 			"sensei-lms/course-navigation": {
 				"css": "& .sensei-lms-course-navigation-lesson__title { font-family: var(--wp--preset--font-family--body); font-size: .875rem; font-weight: 400; } & .sensei-lms-course-navigation-module__title { font-family: var(--wp--preset--font-family--body); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; text-transform: none; }"
+			},
+			"sensei-lms/quiz-back-to-lesson": {
+				"typography": {
+					"fontFamily": "var(--wp--preset--font-family--body)"
+				}
+			},
+			"sensei-lms/quiz-actions": {
+				"css": "& .sensei-quiz-actions-secondary .sensei-quiz-action .quiz-submit { font-size: var(--wp--custom--typography--font-sizes--normal); }"
+			},
+			"sensei-lms/quiz-question": {
+				"typography": {
+					"fontSize": "var(--wp--custom--typography--font-sizes--normal)"
+				},
+				"elements": {
+					"h2": {
+						"typography": {
+							"fontFamily": "var(--wp--preset--font-family--heading)",
+							"fontWeight": "400"
+						}
+					}
+				},
+				"css": "& .grade { font-weight: 600; font-family: var(--wp--preset--font-family--heading); } "
 			}
 		},
 		"elements": {

+ 23 - 1
course/styles/dark.json

@@ -46,7 +46,7 @@
 				"fontSizes": {
 					"normal": "clamp(1.125rem, 1.036rem + 0.238vw, 1.25rem)",
 					"button": "clamp(0.875rem, 0.875rem + ((1vw - 0.48rem) * 0.481), 1.125rem)",
-					"fixed": "clamp(1.125rem, 1.125rem, 1.125rem)"
+					"fixed": "1.125rem"
 				}
 			}
 		},
@@ -248,6 +248,28 @@
 			},
 			"sensei-lms/course-navigation": {
 				"css": "& .sensei-lms-course-navigation-lesson__title { font-family: var(--wp--preset--font-family--heading); font-size: .875rem; } & .sensei-lms-course-navigation-lesson__extra { font-family: var(--wp--preset--font-family--heading); } & .sensei-lms-course-navigation-module__summary { font-family: var(--wp--preset--font-family--heading); } & .sensei-lms-course-navigation-module__title { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.04em; text-transform: none; }"
+			},
+			"sensei-lms/quiz-back-to-lesson": {
+				"typography": {
+					"fontFamily": "var(--wp--preset--font-family--heading)"
+				}
+			},
+			"sensei-lms/quiz-actions": {
+				"css": "& .sensei-quiz-actions-secondary .sensei-quiz-action .quiz-submit { font-size: var(--wp--custom--typography--font-sizes--fixed); }"
+			},
+			"sensei-lms/quiz-question": {
+				"typography": {
+					"fontSize": "var(--wp--custom--typography--font-sizes--normal)"
+				},
+				"elements": {
+					"h2": {
+						"typography": {
+							"fontFamily": "var(--wp--preset--font-family--heading)",
+							"fontWeight": "700"
+						}
+					}
+				},
+				"css": "& .grade { font-weight: 700; font-family: var(--wp--preset--font-family--heading); }"
 			}
 		},
 		"elements": {

+ 23 - 0
course/styles/gold.json

@@ -283,6 +283,29 @@
 				"typography": {
 					"fontWeight": "700"
 				}
+			},
+			"sensei-lms/quiz-back-to-lesson": {
+				"typography": {
+					"fontWeight": "700",
+					"fontFamily": "var(--wp--preset--font-family--heading)"
+				}
+			},
+			"sensei-lms/quiz-actions": {
+				"css": "& .sensei-quiz-actions-secondary .sensei-quiz-action .quiz-submit { font-size: var(--wp--custom--typography--font-sizes--normal); }"
+			},
+			"sensei-lms/quiz-question": {
+				"typography": {
+					"fontSize": "clamp(1rem, 0.885rem + 0.385vw, 1.125rem)"
+				},
+				"elements": {
+					"h2": {
+						"typography": {
+							"fontFamily": "var(--wp--preset--font-family--heading)",
+							"fontWeight": "700"
+						}
+					}
+				},
+				"css": "& .grade { font-weight: 700; font-family: var(--wp--preset--font-family--heading); }"
 			}
 		},
 		"elements": {

+ 37 - 1
course/theme.json

@@ -788,8 +788,44 @@
 					"fontSize": "var(--wp--preset--font-size--medium)",
 					"letterSpacing": "0.01em"
 				}
+			},
+			"sensei-lms/quiz-back-to-lesson": {
+				"typography": {
+					"fontFamily": "var(--wp--preset--font-family--system)"
+				}
+			},
+			"sensei-lms/quiz-actions": {
+				"css": "& .sensei-quiz-actions-secondary .sensei-quiz-action .quiz-submit { font-size: var(--wp--custom--typography--font-sizes--normal); }"
+			},
+			"sensei-lms/quiz-question": {
+				"typography": {
+					"fontSize": "var(--wp--preset--font-size--medium)"
+				},
+				"elements": {
+					"h2": {
+						"typography": {
+							"fontSize": "clamp(1.5rem, 0.808rem + 2.308vw, 2.25rem)",
+							"fontFamily": "var(--wp--preset--font-family--system)",
+							"fontWeight": "590",
+							"lineHeight": "1",
+							"letterSpacing": "-0.36px"
+						},
+						"spacing": {
+							"margin": {
+								"bottom": "40px",
+								"top": "80px"
+							},
+							"padding": {
+								"bottom": "0",
+								"top": "0",
+								"left": "0",
+								"right": "0"
+							}
+						}
+					}
+				},
+				"css": "& .grade { font-family: var(--wp--preset--font-family--system) }"
 			}
-
 		},
 		"color": {
 			"background": "var(--wp--preset--color--background)",