apache / apache/netbeans

`@media` breaks the coloring of the php code

Open
#7,330 0 comments 0 reactions 0 assignees View on GitHub
CSS kind:bug needs:triage PHP
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 21

### What happened

Using `@media` after the php code breaks its coloring.

![css_media_coloring](https://github.com/apache/netbeans/assets/9607501/60f3b676-7ad8-4533-ba7a-d6f619e5ee82)

### Language / Project Type / NetBeans Component

php, css

### How to reproduce

- Create a new php file.
- Add code to the file
```php

@media screen and (min-width: 720px) {
}

```

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

Ubuntu 22.04.4 LTS

### JDK

OpenJDK Runtime Environment 17.0.10+7-Ubuntu-122.04.1

### Apache NetBeans packaging

Apache NetBeans binary zip

### Anything else

_No response_

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Reproduce the problem in a new PHP file using the provided PHP code followed by an embedded block containing @media. Start by tracing the PHP/CSS editor syntax-coloring handling for that boundary. Done means the PHP code keeps its correct coloring when the @media rule is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, php
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.