smaller font for header, announcements full size always
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Sam Russell
|
||||
Captured Sun
|
||||
2.21.26 - Making state() be called on initial definition
|
||||
2.21.26 - Making state() be called on initial definition, fixing fontSize so it works with clamp(), other strings
|
||||
2.20.26 - Adding state()
|
||||
2.19.26 - Adding dynamicText()
|
||||
2.16.26 - Adding event objects to the onTouch callbacks
|
||||
@@ -472,7 +472,7 @@ HTMLElement.prototype.setUpState = function(styleFunc, cb) {
|
||||
}
|
||||
|
||||
function StyleFunction(func) {
|
||||
let styleFunction = function(value, unit = "px") {
|
||||
let styleFunction = function(value, unit) {
|
||||
if(typeof value === 'function') {
|
||||
this.setUpState(styleFunction, value)
|
||||
return this
|
||||
@@ -528,7 +528,7 @@ HTMLElement.prototype.borderHorizontal = StyleFunction(function(value) {
|
||||
return this
|
||||
})
|
||||
|
||||
HTMLElement.prototype.fontSize = StyleFunction(function(value, unit = "px") {
|
||||
HTMLElement.prototype.fontSize = StyleFunction(function(value, unit) {
|
||||
|
||||
switch(value) {
|
||||
case "6xl":
|
||||
@@ -570,7 +570,13 @@ HTMLElement.prototype.fontSize = StyleFunction(function(value, unit = "px") {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this.style.fontSize = value + unit
|
||||
|
||||
if(unit) {
|
||||
this.style.fontSize = value + unit
|
||||
} else {
|
||||
this.style.fontSize = value
|
||||
}
|
||||
|
||||
return this
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user