From f6ae7ad5b9eaafcf0b511ecf6128c4d9afddac27 Mon Sep 17 00:00:00 2001 From: Ryan Shaw Date: Thu, 15 Feb 2018 11:49:09 -0700 Subject: [PATCH] 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 Reviewed-by: Ryan Shaw Tested-by: Jenkins QA-Review: Jeremy Putnam Product-Review: Ryan Shaw --- .../bundles/what_gets_loaded_inside_the_tinymce_editor.scss | 6 +++++- app/stylesheets/components/_ic-typography.scss | 6 +++--- app/views/layouts/application.html.erb | 2 +- gulpfile.js | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/stylesheets/bundles/what_gets_loaded_inside_the_tinymce_editor.scss b/app/stylesheets/bundles/what_gets_loaded_inside_the_tinymce_editor.scss index 07348d68aca..6d1f539060a 100644 --- a/app/stylesheets/bundles/what_gets_loaded_inside_the_tinymce_editor.scss +++ b/app/stylesheets/bundles/what_gets_loaded_inside_the_tinymce_editor.scss @@ -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; } diff --git a/app/stylesheets/components/_ic-typography.scss b/app/stylesheets/components/_ic-typography.scss index c14ae16424d..463013c62eb 100644 --- a/app/stylesheets/components/_ic-typography.scss +++ b/app/stylesheets/components/_ic-typography.scss @@ -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 { diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index ea5dc7e1884..191b29030bd 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -77,7 +77,7 @@ load_blueprint_courses_ui -%> <%= render :partial => "layouts/head" %> -"> + lato-font-not-loaded-yet"> <%if @real_current_user && @real_current_user != @current_user %>