Detect more browser hacks in values#584
Merged
bartveneman merged 8 commits intomainfrom Apr 28, 2026
Merged
Conversation
Detects progid:DXImageTransform.Microsoft filter, trailing \9/\7 identifier hacks, alpha(opacity=), expression(), and behavior .htc URL hacks. Custom properties are excluded to prevent false positives. https://claude.ai/code/session_016WKR6cnpvkF5ApX7tt7KoC
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #584 +/- ##
==========================================
- Coverage 95.20% 94.48% -0.72%
==========================================
Files 18 18
Lines 1000 1016 +16
Branches 314 321 +7
==========================================
+ Hits 952 960 +8
- Misses 40 46 +6
- Partials 8 10 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bundle ReportChanges will increase total bundle size by 1.32kB (1.68%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: analyzeCss-esmAssets Changed:
Files in
Files in
Files in
|
bartveneman
added a commit
to projectwallace/stylelint-plugin
that referenced
this pull request
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends browser hack detection to identify Internet Explorer-specific CSS hacks used in property values, beyond the existing
\9hack detection. This provides more comprehensive analysis of legacy IE compatibility code.Key Changes
New
isValueBrowserhack()function insrc/values/browserhacks.tsthat detects multiple IE hack patterns:progid:prefix for DXImageTransform filters (case-insensitive)\9(IE9) and\7(IE7) escape hacks on identifiersalpha()function for IE opacity (case-insensitive)expression()function for IE dynamic values (case-insensitive).htcbehavior files inurl()functions (case-insensitive)Updated detection logic in
src/index.ts:isIe9Hack()check with comprehensiveisValueBrowserhack()callback--*) from hack detection\9and\7hacksComprehensive test coverage with 26 new test cases covering:
Public API export of
isValueBrowserhack()function for external useImplementation Details
progid:detection to handle quoted and unquoted valuesalpha(),expression()) and URL nodes (.htcfiles)isIe9Hack()functionhttps://claude.ai/code/session_016WKR6cnpvkF5ApX7tt7KoC