Skip to content

Commit

Permalink
Update css-generator.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jessuppi authored Dec 11, 2024
1 parent 5be153f commit 5af5611
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions inc/css-generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ function hovercraft_generate_css(){

@media screen and (max-width: 1200px) {
h1 {
font-family: <?php echo ucwords(str_replace("_", " ", $h1_font_family)); ?>;
font-family: <?php echo !empty($h1_font_family) ? ucwords(str_replace("_", " ", $h1_font_family)) : ucwords(str_replace("_", " ", $default_font_family)); ?>;
font-weight: <?php echo $h1_font_weight; ?>;
font-size: <?php echo $h1_mobile_font_size; ?>px;
margin-bottom: 20px;
Expand All @@ -1136,7 +1136,7 @@ function hovercraft_generate_css(){

@media screen and (min-width: 1200px) {
h1 {
font-family: <?php echo ucwords(str_replace("_", " ", $h1_font_family)); ?>;
font-family: <?php echo !empty($h1_font_family) ? ucwords(str_replace("_", " ", $h1_font_family)) : ucwords(str_replace("_", " ", $default_font_family)); ?>;
font-weight: <?php echo $h1_font_weight; ?>;
font-size: <?php echo $h1_desktop_font_size; ?>px;
margin-bottom: 30px;
Expand Down Expand Up @@ -1165,6 +1165,7 @@ function hovercraft_generate_css(){

@media screen and (max-width: 1200px) {
h2 {
font-family: <?php echo !empty($h2_font_family) ? ucwords(str_replace("_", " ", $h2_font_family)) : ucwords(str_replace("_", " ", $default_font_family)); ?>;
font-weight: <?php echo $h2_font_weight; ?>;
font-size: <?php echo $h2_mobile_font_size; ?>px;
margin-bottom: 20px;
Expand All @@ -1173,6 +1174,7 @@ function hovercraft_generate_css(){

@media screen and (min-width: 1200px) {
h2 {
font-family: <?php echo !empty($h2_font_family) ? ucwords(str_replace("_", " ", $h2_font_family)) : ucwords(str_replace("_", " ", $default_font_family)); ?>;
font-weight: <?php echo $h2_font_weight; ?>;
font-size: <?php echo $h2_desktop_font_size; ?>px;
margin-bottom: 30px;
Expand Down Expand Up @@ -1201,6 +1203,7 @@ function hovercraft_generate_css(){

@media screen and (max-width: 1200px) {
h3 {
font-family: <?php echo !empty($h3_font_family) ? ucwords(str_replace("_", " ", $h3_font_family)) : ucwords(str_replace("_", " ", $default_font_family)); ?>;
font-weight: <?php echo $h3_font_weight; ?>;
font-size: <?php echo $h3_mobile_font_size; ?>px;
margin-bottom: 20px;
Expand All @@ -1209,6 +1212,7 @@ function hovercraft_generate_css(){

@media screen and (min-width: 1200px) {
h3 {
font-family: <?php echo !empty($h3_font_family) ? ucwords(str_replace("_", " ", $h3_font_family)) : ucwords(str_replace("_", " ", $default_font_family)); ?>;
font-weight: <?php echo $h3_font_weight; ?>;
font-size: <?php echo $h3_desktop_font_size; ?>px;
margin-bottom: 20px;
Expand All @@ -1217,6 +1221,7 @@ function hovercraft_generate_css(){

@media screen and (max-width: 1200px) {
h4 {
font-family: <?php echo !empty($h4_font_family) ? ucwords(str_replace("_", " ", $h4_font_family)) : ucwords(str_replace("_", " ", $default_font_family)); ?>;
font-weight: <?php echo $h4_font_weight; ?>;
font-size: <?php echo $h4_mobile_font_size; ?>px;
margin-bottom: 20px;
Expand All @@ -1225,6 +1230,7 @@ function hovercraft_generate_css(){

@media screen and (min-width: 1200px) {
h4 {
font-family: <?php echo !empty($h4_font_family) ? ucwords(str_replace("_", " ", $h4_font_family)) : ucwords(str_replace("_", " ", $default_font_family)); ?>;
font-weight: <?php echo $h4_font_weight; ?>;
font-size: <?php echo $h4_desktop_font_size; ?>px;
margin-bottom: 20px;
Expand All @@ -1241,6 +1247,7 @@ function hovercraft_generate_css(){

@media screen and (max-width: 1200px) {
h5 {
font-family: <?php echo !empty($h5_font_family) ? ucwords(str_replace("_", " ", $h5_font_family)) : ucwords(str_replace("_", " ", $default_font_family)); ?>;
font-weight: <?php echo $h5_font_weight; ?>;
font-size: <?php echo $h5_mobile_font_size; ?>px;
margin-bottom: 20px;
Expand All @@ -1249,6 +1256,7 @@ function hovercraft_generate_css(){

@media screen and (min-width: 1200px) {
h5 {
font-family: <?php echo !empty($h5_font_family) ? ucwords(str_replace("_", " ", $h5_font_family)) : ucwords(str_replace("_", " ", $default_font_family)); ?>;
font-weight: <?php echo $h5_font_weight; ?>;
font-size: <?php echo $h5_desktop_font_size; ?>px;
margin-bottom: 20px;
Expand Down

0 comments on commit 5af5611

Please sign in to comment.