diff --git a/cms/static/sass/_mixins-inherited.scss b/cms/static/sass/_mixins-inherited.scss index a766919c74..c0d9df77ce 100644 --- a/cms/static/sass/_mixins-inherited.scss +++ b/cms/static/sass/_mixins-inherited.scss @@ -5,6 +5,12 @@ // talbs: we need to slowly ween ourselves off of these // ==================== + +// line-height (old way) +@function lh($amount: 1) { + @return $body-line-height * $amount; +} + // inherited - vertical and horizontal centering @mixin vertically-and-horizontally-centered ($height, $width) { left: 50%; diff --git a/cms/static/sass/elements/_header.scss b/cms/static/sass/elements/_header.scss index 50167ff042..8c7d59038e 100644 --- a/cms/static/sass/elements/_header.scss +++ b/cms/static/sass/elements/_header.scss @@ -139,8 +139,8 @@ // specific elements - course nav .nav-course { width: 290px; + @extend .t-copy-sub1; margin-top: -($baseline/4); - @include font-size(14); > ol > .nav-item { vertical-align: bottom; @@ -158,8 +158,8 @@ color: $gray-d3; .label-prefix { - display: block; @include font-size(11); + display: block; font-weight: 400; } } diff --git a/cms/static/sass/elements/_typography.scss b/cms/static/sass/elements/_typography.scss index 9e9ca69652..69e78750c0 100644 --- a/cms/static/sass/elements/_typography.scss +++ b/cms/static/sass/elements/_typography.scss @@ -11,54 +11,54 @@ .t-title1 { @extend .t-title; @include font-size(60); - @include lh(60); + @include line-height(60); } .t-title2 { @extend .t-title; @include font-size(48); - @include lh(48); + @include line-height(48); } .t-title3 { @include font-size(36); - @include lh(36); + @include line-height(36); } .t-title4 { @extend .t-title; @include font-size(24); - @include lh(24); + @include line-height(24); } .t-title5 { @extend .t-title; @include font-size(18); - @include lh(18); + @include line-height(18); } .t-title6 { @extend .t-title; @include font-size(16); - @include lh(16); + @include line-height(16); } .t-title7 { @extend .t-title; @include font-size(14); - @include lh(14); + @include line-height(14); } .t-title8 { @extend .t-title; @include font-size(12); - @include lh(12); + @include line-height(12); } .t-title9 { @extend .t-title; @include font-size(11); - @include lh(11); + @include line-height(11); } // ==================== @@ -71,31 +71,31 @@ .t-copy-base { @extend .t-copy; @include font-size(16); - @include lh(16); + @include line-height(16); } .t-copy-lead1 { @extend .t-copy; @include font-size(18); - @include lh(18); + @include line-height(18); } .t-copy-lead2 { @extend .t-copy; @include font-size(24); - @include lh(24); + @include line-height(24); } .t-copy-sub1 { @extend .t-copy; @include font-size(14); - @include lh(14); + @include line-height(14); } .t-copy-sub2 { @extend .t-copy; @include font-size(12); - @include lh(12); + @include line-height(12); } // ==================== @@ -103,22 +103,22 @@ // actions/labels .t-action1 { @include font-size(18); - @include lh(18); + @include line-height(18); } .t-action2 { @include font-size(16); - @include lh(16); + @include line-height(16); } .t-action3 { @include font-size(14); - @include lh(14); + @include line-height(14); } .t-action4 { @include font-size(12); - @include lh(12); + @include line-height(12); } diff --git a/common/static/sass/_mixins.scss b/common/static/sass/_mixins.scss index 6e1a34aaaa..c3a548bbf7 100644 --- a/common/static/sass/_mixins.scss +++ b/common/static/sass/_mixins.scss @@ -8,7 +8,7 @@ } // mixins - line height -@mixin lh($fontSize: auto){ +@mixin line-height($fontSize: auto){ line-height: ($fontSize*1.48) + px; line-height: (($fontSize/10)*1.48) + rem; } diff --git a/lms/djangoapps/notes/migrations/0001_initial.py b/lms/djangoapps/notes/migrations/0001_initial.py index 738d121e79..1629b2355d 100644 --- a/lms/djangoapps/notes/migrations/0001_initial.py +++ b/lms/djangoapps/notes/migrations/0001_initial.py @@ -13,7 +13,7 @@ class Migration(SchemaMigration): ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('uri', self.gf('django.db.models.fields.CharField')(max_length=1024, db_index=True)), + ('uri', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), ('text', self.gf('django.db.models.fields.TextField')(default='')), ('quote', self.gf('django.db.models.fields.TextField')(default='')), ('range_start', self.gf('django.db.models.fields.CharField')(max_length=2048)), @@ -82,7 +82,7 @@ class Migration(SchemaMigration): 'tags': ('django.db.models.fields.TextField', [], {'default': "''"}), 'text': ('django.db.models.fields.TextField', [], {'default': "''"}), 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'uri': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'db_index': 'True'}), + 'uri': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) } } diff --git a/lms/djangoapps/notes/models.py b/lms/djangoapps/notes/models.py index 7c9db7dc28..aa2ec7a377 100644 --- a/lms/djangoapps/notes/models.py +++ b/lms/djangoapps/notes/models.py @@ -9,7 +9,7 @@ import json class Note(models.Model): user = models.ForeignKey(User, db_index=True) course_id = models.CharField(max_length=255, db_index=True) - uri = models.CharField(max_length=1024, db_index=True) + uri = models.CharField(max_length=255, db_index=True) text = models.TextField(default="") quote = models.TextField(default="") range_start = models.CharField(max_length=2048) # xpath string @@ -21,9 +21,9 @@ class Note(models.Model): updated = models.DateTimeField(auto_now=True, db_index=True) def clean(self, json_body): - ''' + """ Cleans the note object or raises a ValidationError. - ''' + """ if json_body is None: raise ValidationError('Note must have a body.') @@ -53,16 +53,16 @@ class Note(models.Model): self.tags = ",".join(tags) def get_absolute_url(self): - ''' - Returns the aboslute url for the note object. - ''' + """ + Returns the absolute url for the note object. + """ kwargs = {'course_id': self.course_id, 'note_id': str(self.pk)} return reverse('notes_api_note', kwargs=kwargs) def as_dict(self): - ''' + """ Returns the note object as a dictionary. - ''' + """ return { 'id': self.pk, 'user_id': self.user.pk,