ensure lato font is loaded in the rce
closes CORE-822 test plan: - go to a page with an rce - type some text - inspect element on the text - look at computed styles - font-family should start with "Lato" Change-Id: I339c093e5a15d48f3a57e86e492afb3bffb5efeb Reviewed-on: https://gerrit.instructure.com/141096 Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com> Reviewed-by: Ryan Shaw <ryan@instructure.com> Tested-by: Jenkins QA-Review: Jeremy Putnam <jeremyp@instructure.com> Product-Review: Ryan Shaw <ryan@instructure.com>
This commit is contained in:
parent
aa3de2dd6d
commit
f6ae7ad5b9
|
@ -23,7 +23,11 @@
|
|||
// the first line of public/javascripts/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css
|
||||
// sets these to undesireable values, rather than modify that vendor file, we just override them here
|
||||
// to match the rest of the content in canvas
|
||||
body,
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
td {
|
||||
margin: 0;
|
||||
}
|
||||
|
|
|
@ -70,10 +70,10 @@ html {
|
|||
font-size: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
font-family: $ic-font-family-fallback;
|
||||
&.lato-font-loaded {
|
||||
font-family: $ic-font-family;
|
||||
&.lato-font-not-loaded-yet {
|
||||
font-family: $ic-font-family-fallback;
|
||||
}
|
||||
font-family: $ic-font-family;
|
||||
}
|
||||
|
||||
body {
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
load_blueprint_courses_ui
|
||||
-%>
|
||||
<%= render :partial => "layouts/head" %>
|
||||
<body class="<%= (@body_classes).uniq.join(" ") %>">
|
||||
<body class="<%= (@body_classes).uniq.join(" ") %> lato-font-not-loaded-yet">
|
||||
<%if @real_current_user && @real_current_user != @current_user %>
|
||||
<div role="alert" class="screenreader-only">
|
||||
<% if @current_user.fake_student? %>
|
||||
|
|
|
@ -51,7 +51,7 @@ gulp.task('rev', () => {
|
|||
.pipe(gulpPlugins.rename('lato-fontfaceobserver.js'))
|
||||
.pipe(gulpPlugins.insert.append(`
|
||||
new FontFaceObserver('LatoWeb').load().then(function () {
|
||||
document.documentElement.classList.add('lato-font-loaded');
|
||||
document.documentElement.classList.remove('lato-font-not-loaded-yet');
|
||||
}, console.log.bind(console, 'Failed to load Lato font'));
|
||||
`))
|
||||
|
||||
|
|
Loading…
Reference in New Issue