Skip to content

mobileFirstDesing changes - #11

Merged
khankadir193 merged 2 commits into
mainfrom
portfolio-design-implementation
Jun 29, 2026
Merged

mobileFirstDesing changes#11
khankadir193 merged 2 commits into
mainfrom
portfolio-design-implementation

Conversation

@khankadir193

@khankadir193 khankadir193 commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added a “Read More” experience for projects with a full-screen modal, including project details, tech tags, and live links.
    • Updated the mobile navigation with a toggle menu and Escape-key close support.
    • Improved image loading on the About page with responsive sizing hints and prioritized display.
  • Bug Fixes

    • Improved mobile layouts and spacing across footer, about, education, skills, and contact sections.
    • Added better text wrapping and reduced overflow on smaller screens.
    • Added reduced-motion handling for a smoother accessibility experience.

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
portfolio-next-js Ready Ready Preview, Comment, Open in v0 Jun 29, 2026 8:56am

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Removes the Hero, AboutSection, and CardComponents files. Adds a new ProjectCardWithModal component with accessibility-focused modal (focus trap, scroll lock, keyboard dismiss). Extends Navbar with a mobile hamburger menu and Escape-key close. Applies fluid clamp()-based typography, variable-based spacing, and responsive layout fixes across About, Footer, and section CSS modules.

Changes

Project Card Modal Feature

Layer / File(s) Summary
ProjectCardWithModal component and styles
app/components/ProjectCardWithModal.jsx, app/components/ProjectCardWithModal.module.css
New ProjectModal with focus trap, scroll lock, overlay/Escape/button close paths, and full CSS module for overlay, container, close button, tech tags, and responsive breakpoints.
ProjectCardComponent onReadMore button and styles
app/SectionComponents.js, app/SectionComponents.module.css
ProjectCardComponent gains onReadMore prop and a "Read More →" button; CSS adds .projectReadMore styles and updates projectHeader, projectDescription, and sectionTitle.
ProjectsSection wired to ProjectCardWithModal
app/sections/ProjectsSection.js
Imports and renders ProjectCardWithModal per project instead of the previous ProjectCardComponent.

Mobile Hamburger Navigation

Layer / File(s) Summary
Navbar mobile menu state and interaction logic
app/Navbar.js
Adds isMenuOpen state, Escape keydown effect, memoized handleNavClick that closes menu, and toggle button in JSX with open/closed class on links container.
Hamburger toggle and mobile nav panel CSS
app/globals.css
Replaces footer block with .navbar-toggle animated hamburger/X styles, mobile nav panel slide transitions, fluid clamp() typography variables, and prefers-reduced-motion ruleset.

Hero/AboutSection/CardComponents removal and responsive CSS polish

Layer / File(s) Summary
Hero, AboutSection, CardComponents removal
app/HomeClient.jsx
Hero.js, Hero.module.css, AboutSection.js, and CardComponents.js are deleted; HomeClient removes the <footer> wrapper element and re-enables SSR on the Footer dynamic import.
About section responsive image and layout
app/About.js, app/About.module.css
Profile image gains sizes and priority props; padding switches to CSS variables; 768px breakpoint adds column-reverse flex layout.
Footer spacing and responsive CSS polish
app/Footer.module.css
Reduces grid gap, nav/contact/social link spacing, and applies variable-based margins across 1024px, 768px, and 480px breakpoints with added divider borders.
Section-level responsive CSS fixes
app/sections/SkillsSection.module.css, app/sections/ExperienceSection.module.css, app/sections/EducationSection.module.css, app/sections/ContactSection.module.css
SkillsSection gets clamp() min-height; ExperienceSection uses --space-5 margin; EducationSection fixes period wrapping and timelineDot sizing at 768px; ContactSection adds word-break: break-word.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ProjectCardWithModal
  participant ProjectCardComponent
  participant ProjectModal

  User->>ProjectCardComponent: clicks "Read More →"
  ProjectCardComponent->>ProjectCardWithModal: onReadMore()
  ProjectCardWithModal->>ProjectModal: renders (isOpen=true)
  ProjectModal->>ProjectModal: lock scroll, record focused element
  ProjectModal->>ProjectModal: auto-focus first focusable control
  User->>ProjectModal: Escape / overlay click / close button
  ProjectModal->>ProjectCardWithModal: onClose()
  ProjectCardWithModal->>ProjectModal: unmount (isOpen=false)
  ProjectModal->>ProjectModal: restore scroll + return focus
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

v0

🐇 The Hero took a bow and left the stage,
A modal stepped in, the new sage.
Tap "Read More," and watch it rise—
Focus trapped, scroll locked, a pleasant surprise!
The hamburger opens, Escape makes it flee,
Fluid type and clamp() set the layout free! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the PR’s mobile-first UI redesign and responsive layout changes, though it is misspelled and a bit vague.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch portfolio-design-implementation

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: one or more packages not found in the registry.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@khankadir193 khankadir193 changed the title Portfolio design implementation mobileFirstDesing changes Jun 29, 2026
@khankadir193 khankadir193 self-assigned this Jun 29, 2026
@khankadir193
khankadir193 merged commit b1a64ac into main Jun 29, 2026
4 of 5 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/Navbar.js (1)

101-107: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Close the mobile menu when the resume link is activated.

This is the only action inside .nav-links that does not call setIsMenuOpen(false), so on small screens the panel stays open after the download/new tab is triggered. Add the same close behavior here to avoid leaving the current page occluded when the user comes back.

Proposed fix
           <a
             href="/cv/Kadir-CV.pdf"
             download="Kadir-CV.pdf"
             className="download-resume-btn"
+            onClick={() => setIsMenuOpen(false)}
             target="_blank"
             rel="noopener noreferrer"
           >
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/Navbar.js` around lines 101 - 107, The resume link inside Navbar’s
.nav-links does not close the mobile menu, unlike the other navigation actions.
Update the resume anchor in Navbar so it also calls setIsMenuOpen(false) when
activated, matching the behavior used by the other links and ensuring the menu
closes on small screens.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/components/ProjectCardWithModal.jsx`:
- Around line 9-10: The modal cleanup in ProjectCardWithModal currently resets
document.body.style.overflow to an empty string, which can overwrite an existing
inline overflow value. Update the modal open/close effect and its cleanup to
capture the previous body overflow value before setting it, then restore that
saved value on cleanup instead of hardcoding ''. Use the existing overlayRef and
previousFocusRef area to locate the modal lifecycle logic and apply the same
restoration when the modal closes.
- Around line 12-42: The modal focus handling in ProjectCardWithModal only
closes on Escape and does not trap Tab navigation, so keyboard focus can escape
behind the dialog. Update the existing handleKeyDown/useEffect logic to
intercept Tab and Shift+Tab, cycle focus among the dialog’s focusable elements
inside overlayRef.current, and keep focus contained until onClose runs. Use the
existing overlayRef, handleKeyDown, and previousFocusRef setup to implement the
trap and restore focus on cleanup.

In `@app/components/ProjectCardWithModal.module.css`:
- Around line 11-21: The stylesheet’s keyframe names in
ProjectCardWithModal.module.css use camelCase and violate the configured
keyframes-name-pattern rule, so rename the animation and matching `@keyframes`
identifiers to the required stylelint-compliant format. Update every reference
in the module, including the overlay fade-in usage and the other keyframes block
noted in the review, so the animation names stay consistent and lint passes
cleanly.

In `@app/globals.css`:
- Line 614: The `@keyframes` definition for navbarPulse violates the project’s
kebab-case Stylelint rule, so rename this keyframe in app/globals.css to a
kebab-case name and update every matching animation reference to use the same
new name. Make sure the change is applied consistently wherever the keyframe is
defined or consumed so the stylesheet still compiles and passes lint.

In `@app/sections/ContactSection.module.css`:
- Around line 274-276: The .infoText rule in ContactSection.module.css uses a
deprecated wrap property, so replace word-break: break-word with overflow-wrap:
anywhere to preserve the same mobile-friendly long-text wrapping behavior.
Update the existing .infoText selector only, keeping the rest of the contact
text styling unchanged.

---

Outside diff comments:
In `@app/Navbar.js`:
- Around line 101-107: The resume link inside Navbar’s .nav-links does not close
the mobile menu, unlike the other navigation actions. Update the resume anchor
in Navbar so it also calls setIsMenuOpen(false) when activated, matching the
behavior used by the other links and ensuring the menu closes on small screens.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 40a1db79-b109-4e3d-86f6-88780b8ab67a

📥 Commits

Reviewing files that changed from the base of the PR and between 411326b and 6eb568c.

📒 Files selected for processing (19)
  • app/About.js
  • app/About.module.css
  • app/CardComponents.js
  • app/Footer.module.css
  • app/Hero.js
  • app/Hero.module.css
  • app/HomeClient.jsx
  • app/Navbar.js
  • app/SectionComponents.js
  • app/SectionComponents.module.css
  • app/components/ProjectCardWithModal.jsx
  • app/components/ProjectCardWithModal.module.css
  • app/globals.css
  • app/sections/AboutSection.js
  • app/sections/ContactSection.module.css
  • app/sections/EducationSection.module.css
  • app/sections/ExperienceSection.module.css
  • app/sections/ProjectsSection.js
  • app/sections/SkillsSection.module.css
💤 Files with no reviewable changes (4)
  • app/sections/AboutSection.js
  • app/Hero.js
  • app/CardComponents.js
  • app/Hero.module.css

Comment on lines +9 to +10
const overlayRef = useRef(null);
const previousFocusRef = useRef(null);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Restore the previous body overflow value on cleanup.

Closing the modal always writes '' back to document.body.style.overflow. If some other state had already set a non-default inline overflow, this cleanup silently breaks it.

Proposed fix
 function ProjectModal({ project, onClose }) {
   const overlayRef = useRef(null);
   const previousFocusRef = useRef(null);
+  const previousOverflowRef = useRef('');
 
   useEffect(() => {
     previousFocusRef.current = document.activeElement;
+    previousOverflowRef.current = document.body.style.overflow;
 
     document.addEventListener('keydown', handleKeyDown);
     document.body.style.overflow = 'hidden';
@@
     return () => {
       document.removeEventListener('keydown', handleKeyDown);
-      document.body.style.overflow = '';
+      document.body.style.overflow = previousOverflowRef.current;
       previousFocusRef.current?.focus();
     };
   }, [handleKeyDown]);

Also applies to: 24-41

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/components/ProjectCardWithModal.jsx` around lines 9 - 10, The modal
cleanup in ProjectCardWithModal currently resets document.body.style.overflow to
an empty string, which can overwrite an existing inline overflow value. Update
the modal open/close effect and its cleanup to capture the previous body
overflow value before setting it, then restore that saved value on cleanup
instead of hardcoding ''. Use the existing overlayRef and previousFocusRef area
to locate the modal lifecycle logic and apply the same restoration when the
modal closes.

Comment on lines +12 to +42
const handleKeyDown = useCallback((e) => {
if (e.key === 'Escape') {
onClose();
}
}, [onClose]);

const handleOverlayClick = useCallback((e) => {
if (e.target === overlayRef.current) {
onClose();
}
}, [onClose]);

useEffect(() => {
previousFocusRef.current = document.activeElement;

document.addEventListener('keydown', handleKeyDown);
document.body.style.overflow = 'hidden';

const focusable = overlayRef.current?.querySelector(
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
);
if (focusable) {
focusable.focus();
}

return () => {
document.removeEventListener('keydown', handleKeyDown);
document.body.style.overflow = '';
previousFocusRef.current?.focus();
};
}, [handleKeyDown]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep focus trapped inside the dialog.

This only handles Escape. Tab / Shift+Tab can still move focus to elements behind the modal, so keyboard users can leave the active dialog while it is open.

Proposed fix
   const handleKeyDown = useCallback((e) => {
     if (e.key === 'Escape') {
       onClose();
+      return;
     }
+
+    if (e.key === 'Tab' && overlayRef.current) {
+      const focusable = Array.from(
+        overlayRef.current.querySelectorAll(
+          'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
+        )
+      );
+      if (focusable.length === 0) return;
+
+      const first = focusable[0];
+      const last = focusable[focusable.length - 1];
+
+      if (e.shiftKey && document.activeElement === first) {
+        e.preventDefault();
+        last.focus();
+      } else if (!e.shiftKey && document.activeElement === last) {
+        e.preventDefault();
+        first.focus();
+      }
+    }
   }, [onClose]);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const handleKeyDown = useCallback((e) => {
if (e.key === 'Escape') {
onClose();
}
}, [onClose]);
const handleOverlayClick = useCallback((e) => {
if (e.target === overlayRef.current) {
onClose();
}
}, [onClose]);
useEffect(() => {
previousFocusRef.current = document.activeElement;
document.addEventListener('keydown', handleKeyDown);
document.body.style.overflow = 'hidden';
const focusable = overlayRef.current?.querySelector(
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
);
if (focusable) {
focusable.focus();
}
return () => {
document.removeEventListener('keydown', handleKeyDown);
document.body.style.overflow = '';
previousFocusRef.current?.focus();
};
}, [handleKeyDown]);
const handleKeyDown = useCallback((e) => {
if (e.key === 'Escape') {
onClose();
return;
}
if (e.key === 'Tab' && overlayRef.current) {
const focusable = Array.from(
overlayRef.current.querySelectorAll(
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
)
);
if (focusable.length === 0) return;
const first = focusable[0];
const last = focusable[focusable.length - 1];
if (e.shiftKey && document.activeElement === first) {
e.preventDefault();
last.focus();
} else if (!e.shiftKey && document.activeElement === last) {
e.preventDefault();
first.focus();
}
}
}, [onClose]);
const handleOverlayClick = useCallback((e) => {
if (e.target === overlayRef.current) {
onClose();
}
}, [onClose]);
useEffect(() => {
previousFocusRef.current = document.activeElement;
document.addEventListener('keydown', handleKeyDown);
document.body.style.overflow = 'hidden';
const focusable = overlayRef.current?.querySelector(
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
);
if (focusable) {
focusable.focus();
}
return () => {
document.removeEventListener('keydown', handleKeyDown);
document.body.style.overflow = '';
previousFocusRef.current?.focus();
};
}, [handleKeyDown]);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/components/ProjectCardWithModal.jsx` around lines 12 - 42, The modal
focus handling in ProjectCardWithModal only closes on Escape and does not trap
Tab navigation, so keyboard focus can escape behind the dialog. Update the
existing handleKeyDown/useEffect logic to intercept Tab and Shift+Tab, cycle
focus among the dialog’s focusable elements inside overlayRef.current, and keep
focus contained until onClose runs. Use the existing overlayRef, handleKeyDown,
and previousFocusRef setup to implement the trap and restore focus on cleanup.

Comment on lines +11 to +21
animation: overlayFadeIn 0.2s ease;
}

@keyframes overlayFadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Rename the keyframes to match the enforced stylelint pattern.

The current camelCase names trip the configured keyframes-name-pattern rule, so this stylesheet will not lint cleanly.

Proposed fix
 .overlay {
@@
-  animation: overlayFadeIn 0.2s ease;
+  animation: overlay-fade-in 0.2s ease;
 }
 
-@keyframes overlayFadeIn {
+@keyframes overlay-fade-in {
@@
 .modal {
@@
-  animation: modalSlideUp 0.25s ease;
+  animation: modal-slide-up 0.25s ease;
 }
 
-@keyframes modalSlideUp {
+@keyframes modal-slide-up {

Also applies to: 35-47

🧰 Tools
🪛 Stylelint (17.13.0)

[error] 14-14: Expected keyframe name "overlayFadeIn" to be kebab-case (keyframes-name-pattern)

(keyframes-name-pattern)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/components/ProjectCardWithModal.module.css` around lines 11 - 21, The
stylesheet’s keyframe names in ProjectCardWithModal.module.css use camelCase and
violate the configured keyframes-name-pattern rule, so rename the animation and
matching `@keyframes` identifiers to the required stylelint-compliant format.
Update every reference in the module, including the overlay fade-in usage and
the other keyframes block noted in the review, so the animation names stay
consistent and lint passes cleanly.

Source: Linters/SAST tools

Comment thread app/globals.css
.nav-links li a {
padding: 0.3rem 0.4rem;
font-size: 0.7rem;
@keyframes navbarPulse {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Rename the keyframe to satisfy the configured Stylelint rule.

Line 614 introduces @keyframes navbarPulse, but Stylelint already flags it because the project enforces kebab-case keyframe names. Rename the keyframe and its corresponding animation references together, otherwise this change will keep failing lint.

🧰 Tools
🪛 Stylelint (17.13.0)

[error] 614-614: Expected keyframe name "navbarPulse" to be kebab-case (keyframes-name-pattern)

(keyframes-name-pattern)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/globals.css` at line 614, The `@keyframes` definition for navbarPulse
violates the project’s kebab-case Stylelint rule, so rename this keyframe in
app/globals.css to a kebab-case name and update every matching animation
reference to use the same new name. Make sure the change is applied consistently
wherever the keyframe is defined or consumed so the stylesheet still compiles
and passes lint.

Source: Linters/SAST tools

Comment on lines 274 to +276
.infoText {
font-size: 0.9rem;
word-break: break-word;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- Target file around lines 250-290 ---'
nl -ba app/sections/ContactSection.module.css | sed -n '250,290p'

echo
echo '--- Search for word-break / overflow-wrap usage ---'
rg -n "word-break|overflow-wrap" app/sections -g '*.css' || true

echo
echo '--- Search for stylelint config and rules mentioning word-break ---'
git ls-files | rg '(^|/)(stylelint|\.stylelintrc|stylelint\.config)|package\.json$|\.css$' || true
rg -n "word-break|overflow-wrap|stylelint" . -g '.stylelintrc*' -g 'stylelint.config.*' -g 'package.json' -g '*.js' -g '*.cjs' -g '*.mjs' -g '*.json' || true

Repository: khankadir193/Portfolio-Next-Js

Length of output: 249


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- Target file around lines 250-290 ---'
sed -n '250,290p' app/sections/ContactSection.module.css | sed '=' | sed 'N;s/\n/\t/'

echo
echo '--- Search for word-break / overflow-wrap usage in CSS ---'
rg -n "word-break|overflow-wrap" app -g '*.css' || true

echo
echo '--- Find stylelint config / package.json ---'
git ls-files | rg '(^|/)(\.stylelintrc(\..*)?|stylelint\.config\..*|package\.json)$'

echo
echo '--- Search for related lint rules/config references ---'
rg -n "word-break|overflow-wrap|stylelint" . -g '.stylelintrc*' -g 'stylelint.config.*' -g 'package.json' -g '*.js' -g '*.cjs' -g '*.mjs' -g '*.json' || true

Repository: khankadir193/Portfolio-Next-Js

Length of output: 1177


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,260p' package.json | sed '=' | sed 'N;s/\n/\t/'

echo
echo '--- stylelint mentions in package.json ---'
rg -n "stylelint|lint" package.json || true

Repository: khankadir193/Portfolio-Next-Js

Length of output: 907


🌐 Web query:

MDN word-break break-word deprecated overflow-wrap anywhere

💡 Result:

The CSS declaration word-break: break-word is deprecated [1][2]. It is widely recommended to use overflow-wrap: anywhere as its modern, standard replacement [3][2]. ### Status and Recommendation - Deprecation: The break-word keyword for the word-break property is deprecated [1][4][5]. Modern CSS specifications and browser standards discourage its use in new projects [2]. - Preferred Alternative: overflow-wrap: anywhere is the current standard approach to achieve the desired wrapping behavior [3][2]. It instructs the browser to break otherwise unbreakable strings (like long URLs or words) at arbitrary points if no other valid break opportunities exist [6]. ### Why the Change? Historically, word-break: break-word was introduced as a non-standard value to address text overflow issues [1][7]. Its behavior was eventually superseded by the standardization of overflow-wrap [6]. Using overflow-wrap: anywhere is preferred because it provides more predictable behavior across modern browsers and aligns with current CSS specifications [6][3]. ### Key Differences to Note While word-break: break-word and overflow-wrap: anywhere are often used to solve the same problem (preventing text overflow), they can differ in how they influence the layout's "intrinsic size" calculation [8][9]. Specifically, overflow-wrap: anywhere takes the soft wrap opportunities introduced by the break into account when calculating the min-content size of a container [6][9], whereas older implementations of similar properties might have handled this differently [8]. By transitioning to overflow-wrap: anywhere, developers ensure their code adheres to modern standards while maintaining consistent, robust text wrapping [3][2].

Citations:


Use a standard wrap rule for long contact text.

word-break: break-word is deprecated here; switch to overflow-wrap: anywhere to keep the mobile wrapping behavior without relying on the legacy value.

Proposed fix
   .infoText {
     font-size: 0.9rem;
-    word-break: break-word;
+    overflow-wrap: anywhere;
+    word-break: normal;
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.infoText {
font-size: 0.9rem;
word-break: break-word;
.infoText {
font-size: 0.9rem;
overflow-wrap: anywhere;
word-break: normal;
🧰 Tools
🪛 Stylelint (17.13.0)

[error] 276-276: Deprecated keyword "break-word" for property "word-break" (declaration-property-value-keyword-no-deprecated)

(declaration-property-value-keyword-no-deprecated)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/sections/ContactSection.module.css` around lines 274 - 276, The .infoText
rule in ContactSection.module.css uses a deprecated wrap property, so replace
word-break: break-word with overflow-wrap: anywhere to preserve the same
mobile-friendly long-text wrapping behavior. Update the existing .infoText
selector only, keeping the rest of the contact text styling unchanged.

Source: Linters/SAST tools

@coderabbitai coderabbitai Bot mentioned this pull request Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants