케이스 ce-0135-font-family-empty-style-ko · 시나리오 scenario-font-family-change

글꼴 패밀리 제거가 빈 style 속성을 남김

OS: Windows 11 기기: Desktop or Laptop Any 브라우저: Chrome 120.0 키보드: US 초안
fontstyleemptychrome

현상

Chrome에서 글꼴 패밀리 서식을 제거할 때 빈 style 속성이 DOM에 남을 수 있습니다. 이러한 빈 style 속성은 HTML을 비대하게 만들고 목적이 없습니다.

재현 예시

  1. 텍스트에 글꼴 패밀리를 적용합니다: <span style="font-family: Arial">Text</span>
  2. 글꼴 패밀리 서식을 제거합니다
  3. DOM을 관찰합니다

관찰된 동작

  • 빈 style 속성이 남을 수 있습니다: <span style="">Text</span>
  • 또는 빈 span 요소가 남을 수 있습니다: <span></span>
  • DOM이 비대해집니다
  • 불필요한 속성이 누적됩니다

예상 동작

  • style 속성이 비어 있을 때 제거되어야 합니다
  • 빈 요소가 정리되어야 합니다
  • DOM이 최소한이어야 합니다
  • 불필요한 속성이 없어야 합니다

브라우저 비교

  • Chrome/Edge: 빈 스타일을 남길 수 있음 (이 케이스)
  • Firefox: 빈 속성을 남길 가능성이 더 높음
  • Safari: 빈 구조를 남길 가능성이 가장 높음

참고 및 해결 방법 가능한 방향

  • 빈 style 속성 정리
  • 비어 있으면 style 속성 제거
  • 빈 스타일이 있는 요소 언래핑
  • DOM 구조를 정기적으로 정규화

이 시나리오의 변형

케이스 OS 브라우저 상태
ce-0106-font-family-persistence-safari-ko macOS 14.0 Safari 17.0 초안
ce-0135-font-family-empty-style-ko Windows 11 Chrome 120.0 초안
ce-0155-font-family-inheritance-issue-ko Windows 11 Firefox 120.0 초안

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: Windows 11
Device: Desktop or Laptop Any
Browser: Chrome 120.0
Keyboard: US
Your environment
Sample HTML:
Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.