Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Oct 2012 at 13:30 UTC
Updated:
29 Jul 2014 at 21:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunClosely related, possibly duplicate of: #1805452: [meta] Asset library declarations, registry, usage, DX, compatibility, documentation
Comment #2
nod_Or this one? #1861676: Remove stylesheets[] and scripts[] .info file property support for modules.
Comment #3
nod_#1996238: Replace hook_library_info() by *.libraries.yml file Should make it easier for ppl to declare their assets.
Comment #4
nod_remove
scripts[]from info files and replace it withlibrary[]. Whether it's a bug or a feature,hook_library_info()can be called from template.php just fine.stylesheets[] can be kept as is, it's totally fair to add a single css file without dependencies. It's highly unlikely for scripts, they will need to depend on jquery, drupal.js 99% of the time.
Comment #5
nod_ok that patch doesn't work but it's supposed to add the install-page library on all seven pages. But it doesn't work.
Comment #6
tim.plunkettBump, now that we're focusing so much on libraries and their dependencies, I think this is pretty important
Comment #7
nod_Patch works now.
( edit ) and it removes the
scriptskey from the info file.Comment #9
nod_No idea about the color fail.
Comment #11
nod_So the color module only looks into the css files added with stylesheet, not the ones that are in a library.
Probably needs fixing but it's out of scope here.
Comment #12
nod_Added an issue to color module #2228745: Color module doesn't look for CSS files declared in a library.
Comment #13
nod_Change record draft here: https://drupal.org/node/2228783
Comment #14
draganerorI tested this patch and it works really nice...
I created custom theme, in THEMENAME.info.yml I added
created THEMENAME.libraries.yml file and added few important lines into it
(See attached images...)
Comment #15
catchCommitted/pushed to 8.x, thanks!
Comment #17
swentel commentedHmmm, the blocks on the left have a block border now, reverting this patch makes it ok again - unless this is the intention of this patch of course ..
Comment #19
catchInteresting... reverted for now.
Comment #20
nod_Before #11 patch:
After #11 patch:
One can question the need for the library in bartik but it's important enough to have on example in core. so for now just adding the libraries key and not using it until color module is fixed in related issue.
Comment #21
draganerorBorder removed/fixed and patch still works fine with its functionality. Thanks @nod_!
Comment #22
catchCommitted/pushed to 8.x, thanks!