selector completion on php file without hard link to css file

Hi

Setting

 I have a CMS i nwhich many php files  don't have html tag link

The only HTML tag link is define in the main template php file: index.php

In this index.php file ; the link tag code is :<link href="<?php echo .$this->templateNmae . '/index.css' ?> ">

I also use sass to compile all scss files to index.css file .

 

question

When edit any php file on the CMS ; is there a way to have acces ( completion) for all selectors name  without add in each php file a hards  links  to final index.css  ?

<link ........ href="templateName/index.css' >

 

 

 

Thank's

 

6 comments
Comment actions Permalink

@Eugene Morozov

This Dreamweaver functionality is for using in partial/template files where no style/link tags for CSS rules are attached.

This functionality allows to do few things (based on what I remember from CS2/CS3 times): specify what CSS files to use for code completion + limit the scope of possible rules (as only rules that available in those attached files will be available in code completion).

 

@samsam bogard

PhpStorm/WebStorm on contrary, should list (does for me) all styles from all files in the same situation when no <link> tags for *.css files found in current file (in the past there was limit on 20 sources max (e.g. WEB-290)).

So .. it should work (list all styles from all .css files)? If it does not work for you -- how your .php file where it does not work looks like? Does it work like that in all files or only some of them? Will it work if you try the same in another empty project where your .php file has not <link> tags?

2
Comment actions Permalink

Hi

 I think that in phpstorm we should have a way to configure a project by define in the phpstorm level ( not in the php/ html page) some css link to css files . Even if thoses links don't  exist in php or html file , phpstorm should manage this link like if they were define/locate in  html/php  content .The css link should be virtually locate ( load) at the end of all others css content to let css designer/ dev override all the precedent css files and apply each "css virtual files" in the order they have been choose/select ( see Dreamwaeaver DTSS)  .

 

I really think that phpstorm  have to implement the Dreamweaver  Design Time Style sheets  ( DTSS) concept .

With this component and some custom environment/tool/IDE/DW   setting .... i can have selector completion in real time in my php file without adding custom php code t oachieve this .

the only thing i need to do is using DTSS tool to define a link to the any css fileS iwant . 

 

I think phpstrom has this behaviour for javascript : we don't need to import the javascript library ( one file ok but many files ? i don't know) in the file we are coding to use the library  ....We know that this library ll be available (in or link from the source html code)  in the Viewer browser .

Does this make sense for webdesigner  ? Does phpstorom configuration can already handle manage this DTSSC behaviour for css file ?

Here a capture screen of the step to add a css link inside Dreamweaver CS6 DTSS Tool .

Regards

 

 

1
Comment actions Permalink

Why this functionality is not in the core, all other editors parse all the CSS files in the project and recognize in any HTML files, including the HTMLs that don't <link> directly the file. Are there some plugin in PhpStorm that solve this problem?

1
Comment actions Permalink

I hope that I got right that you want PhpStorm to parse the expression located behind the completion invocation area, so it can understand the directory you're referring to.
Unfortunately, it's not possible as PhpStorm is not a PHP interpreter and it can't evaluate such kind of expressions on the fly.

0
Comment actions Permalink

Do I understand right that this DTSS thing is something that keeps a list of CSS files (or any other) which items can be auto completed independently of the context?
I don't think we're going to implement this, to be honest.

0
Comment actions Permalink

Hi

the content of the css file ( the item)  come from css preprocessor ( use in final website) so Dreamweaver during edit html / php page know all the new selectors when css files are update . I was thinking when buy phpstorm that this kind of thing ll be available in phpstorm . More and more dev use CMS and so css link are process during creating cache . Without this functionnalities ; design must be apply to static file before convert it inside dynamic php file or designer must design using browser extension or browser application . Since I have Dreamweaver to design page ( choose html and selector) ...i don't mind if this not appear on phpstorm .

bye

 

 

0

Please sign in to leave a comment.