Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author J B

    (@johnpbloch)

    I’ll have to look into this.

    As a general purpose approach, I’m hesitant to switch from @import to wp_enqueue_style because the plugin has no control over how any given theme loads its own stylesheet.

    If a parent theme already enqueues its stylesheet, it’s unlikely to get overridden by the child theme’s enqueued parent stylesheet. That could result in the parent stylesheet being embedded twice, potentially even after the child stylesheet. Some themes will even hard-code their stylesheets in the head tag above wp_head. In short, @import is the approach that provides the widest assurance that the child theme will work as expected.

    Ideally, the plugin could somehow dry-run the parent theme and figure out where/how the parent theme is getting its stylesheet loaded and generate the child theme accordingly.

    Thread Starter Li-An

    (@li-an)

    You are right. I did some research and this new practive is pretty complicate to use correctly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘import is not used anymore’ is closed to new replies.