HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/exnova-telegram-bot-v2/node_modules/tailwindcss/src/util/applyImportantSelector.js
import parser from 'postcss-selector-parser'
import { movePseudos } from './pseudoElements'

export function applyImportantSelector(selector, important) {
  let sel = parser().astSync(selector)

  sel.each((sel) => {
    // For nesting, we only need to wrap a selector with :is() if it has a top-level combinator,
    // e.g. `.dark .text-white`, to be independent of DOM order. Any other selector, including
    // combinators inside of pseudos like `:where()`, are ok to nest.
    let shouldWrap = sel.nodes.some((node) => node.type === 'combinator')

    if (shouldWrap) {
      sel.nodes = [
        parser.pseudo({
          value: ':is',
          nodes: [sel.clone()],
        }),
      ]
    }

    movePseudos(sel)
  })

  return `${important} ${sel.toString()}`
}