From d4d867121c50bded4176a53d7154cf1bb347e306 Mon Sep 17 00:00:00 2001
From: Yassine Doghri <yassine@doghri.fr>
Date: Fri, 22 Jul 2022 16:45:11 +0000
Subject: [PATCH] fix: add underline and semibold font weight for prose links
 to have them stand out

+ fix typo: "whitespace-no-wrap" --> "whitespace-nowrap"
---
 app/Helpers/components_helper.php         |  2 +-
 app/Views/Components/DropdownMenu.php     |  2 +-
 tailwind.config.js                        | 25 +++++++++++++++++++++++
 themes/cp_admin/_partials/_nav_header.php |  2 +-
 themes/cp_app/_admin_navbar.php           |  2 +-
 5 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/app/Helpers/components_helper.php b/app/Helpers/components_helper.php
index 6989ee4ea7..f0e5f2423d 100644
--- a/app/Helpers/components_helper.php
+++ b/app/Helpers/components_helper.php
@@ -55,7 +55,7 @@ if (! function_exists('data_table')) {
         $table = new Table();
 
         $template = [
-            'table_open' => '<table class="w-full whitespace-no-wrap">',
+            'table_open' => '<table class="w-full whitespace-nowrap">',
 
             'thead_open' =>
                 '<thead class="text-xs font-semibold text-left uppercase text-skin-muted">',
diff --git a/app/Views/Components/DropdownMenu.php b/app/Views/Components/DropdownMenu.php
index be3cc412c8..4b097134ff 100644
--- a/app/Views/Components/DropdownMenu.php
+++ b/app/Views/Components/DropdownMenu.php
@@ -53,7 +53,7 @@ class DropdownMenu extends Component
 
         return <<<HTML
             <nav id="{$this->id}"
-                class="absolute z-50 flex flex-col py-2 whitespace-no-wrap rounded-lg text-skin-base border-contrast bg-elevated border-3"
+                class="absolute z-50 flex flex-col py-2 rounded-lg whitespace-nowrap text-skin-base border-contrast bg-elevated border-3"
                 aria-labelledby="{$this->labelledby}"
                 data-dropdown="menu"
                 data-dropdown-placement="{$this->placement}"
diff --git a/tailwind.config.js b/tailwind.config.js
index e1088e8b64..bb849425cf 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,5 +1,6 @@
 /* eslint-disable */
 const defaultTheme = require("tailwindcss/defaultTheme");
+const { nodeModuleNameResolver } = require("typescript");
 
 /** @type {import('tailwindcss').Config} */
 module.exports = {
@@ -113,6 +114,30 @@ module.exports = {
       ringWidth: {
         3: "3px",
       },
+      typography: {
+        DEFAULT: {
+          css: {
+            a: {
+              textDecoration: "underline",
+              fontWeight: 600,
+              "&:hover": {
+                textDecoration: "none",
+              },
+            },
+          },
+        },
+        sm: {
+          css: {
+            a: {
+              textDecoration: "underline",
+              fontWeight: 600,
+              "&:hover": {
+                textDecoration: "none",
+              },
+            },
+          },
+        },
+      },
     },
   },
   variants: {},
diff --git a/themes/cp_admin/_partials/_nav_header.php b/themes/cp_admin/_partials/_nav_header.php
index 6b40fafce1..e054fd0a85 100644
--- a/themes/cp_admin/_partials/_nav_header.php
+++ b/themes/cp_admin/_partials/_nav_header.php
@@ -72,7 +72,7 @@
                 [
                     'type' => 'html',
                     'content' => esc(<<<CODE_SAMPLE
-                        <nav class="flex flex-col py-2 whitespace-no-wrap">
+                        <nav class="flex flex-col py-2 whitespace-nowrap">
                             <span class="px-4 mb-2 text-xs font-semibold tracking-wider uppercase text-skin-muted">{$interactAsText}</span>
                             <form action="{$route}" method="POST" class="flex flex-col">
                                 {$csrfField}
diff --git a/themes/cp_app/_admin_navbar.php b/themes/cp_app/_admin_navbar.php
index 690ac5909e..da1def26d0 100644
--- a/themes/cp_app/_admin_navbar.php
+++ b/themes/cp_app/_admin_navbar.php
@@ -67,7 +67,7 @@
                     [
                         'type' => 'html',
                         'content' => esc(<<<CODE_SAMPLE
-                            <nav class="flex flex-col py-2 whitespace-no-wrap">
+                            <nav class="flex flex-col py-2 whitespace-nowrap">
                                 <span class="px-4 mb-2 text-xs font-semibold tracking-wider uppercase text-skin-muted">{$interactAsText}</span>
                                 <form action="{$route}" method="POST" class="flex flex-col">
                                     {$csrfField}
-- 
GitLab