Repairing Responsive Layout Failures Using Retrieval Augmented Generation

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Zerin, Tasmia, Asad, Moumita, Hossain, B. M. Mainul, Sakib, Kazi
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866917054805704704
author Zerin, Tasmia
Asad, Moumita
Hossain, B. M. Mainul
Sakib, Kazi
author_facet Zerin, Tasmia
Asad, Moumita
Hossain, B. M. Mainul
Sakib, Kazi
contents Responsive websites frequently experience distorted layouts at specific screen sizes, called Responsive Layout Failures (RLFs). Manually repairing these RLFs involves tedious trial-and-error adjustments of HTML elements and CSS properties. In this study, an automated repair approach, leveraging LLM combined with domain-specific knowledge is proposed. The approach is named ReDeFix, a Retrieval-Augmented Generation (RAG)-based solution that utilizes Stack Overflow (SO) discussions to guide LLM on CSS repairs. By augmenting relevant SO knowledge with RLF-specific contexts, ReDeFix creates a prompt that is sent to the LLM to generate CSS patches. Evaluation demonstrates that our approach achieves an 88\% accuracy in repairing RLFs. Furthermore, a study from software engineers reveals that generated repairs produce visually correct layouts while maintaining aesthetics.
format Preprint
id arxiv_https___arxiv_org_abs_2511_00678
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Repairing Responsive Layout Failures Using Retrieval Augmented Generation
Zerin, Tasmia
Asad, Moumita
Hossain, B. M. Mainul
Sakib, Kazi
Software Engineering
Responsive websites frequently experience distorted layouts at specific screen sizes, called Responsive Layout Failures (RLFs). Manually repairing these RLFs involves tedious trial-and-error adjustments of HTML elements and CSS properties. In this study, an automated repair approach, leveraging LLM combined with domain-specific knowledge is proposed. The approach is named ReDeFix, a Retrieval-Augmented Generation (RAG)-based solution that utilizes Stack Overflow (SO) discussions to guide LLM on CSS repairs. By augmenting relevant SO knowledge with RLF-specific contexts, ReDeFix creates a prompt that is sent to the LLM to generate CSS patches. Evaluation demonstrates that our approach achieves an 88\% accuracy in repairing RLFs. Furthermore, a study from software engineers reveals that generated repairs produce visually correct layouts while maintaining aesthetics.
title Repairing Responsive Layout Failures Using Retrieval Augmented Generation
topic Software Engineering
url https://arxiv.org/abs/2511.00678