shenandoahliterary / Shenandoah

Project management for development and production of Shenandoah literary magazine
1 stars 0 forks source link

Migrating themes to Bootstrap 5 #103

Open jeffreybarry opened 2 years ago

jeffreybarry commented 2 years ago

to do:

jeffreybarry commented 2 years ago

Bootstrap 5 is enabled in the functions.php:

function shenAleph_scripts() {
    wp_enqueue_style( 'bootstrap_css', 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css');
jeffreybarry commented 2 years ago

Links are showing as underlined.  Is Bootstrap 5 using a different reboot? Yes, see https://getbootstrap.com/docs/5.0/migration/

Links are now underlined by default. Need to add a {text-decoration: none;}

DONE.

jeffreybarry commented 2 years ago

Problem

Menu for about, issues, submit, the peak are smushed together without spacing. 

Likely cause

The spacing in these items are controlled by 

<div class="shen-nav d-flex flex-column flex-sm-row justify-content-end">
                    <a class="nav-item nav-link" href="https://shenandoahliterary.org/about/">About</a>
                    <a class="nav-item nav-link" href="https://shenandoahliterary.org/issues/">Issues</a>
                    <a class="nav-item nav-link" href="https://shenandoahliterary.org/submissions/">Submit</a>
                    <a class="nav-item nav-link" href="https://shenandoahliterary.org/thepeak">The Peak</a>
                </div>
jeffreybarry commented 2 years ago

These classes might have changed with Bootstrap 5:

shen-nav d-flex flex-column flex-sm-row justify-content-end in header.php

shen-nav

.shen-nav {
    display: inline-block;
}

Try changing shen-nav to d-inline-flex. That moved entire box over to the left but did not impact spacing.

Try justify-content-end to justify-content-evenly. No change. 

Try simplifying by removing d-inline-flex, flex-column and adding back in one at a time.

The following works as expected, though without justifying the end:

<div class="d-flex justify-content-evenly" >