https://bugzilla.wikimedia.org/show_bug.cgi?id=70351

--- Comment #12 from Matthew Flaschen <mflasc...@wikimedia.org> ---
(In reply to Isarra from comment #11)
> That being said, this also comes up with regard to js gadgets, which will
> often use special buttons even when the skin may not, and they will need a
> sane coloured button default.

That's kind of what I'm getting at below (the login page was just an example). 
JS gadgets and user scripts (even on-wiki content, for mediawiki.ui.button
specifically) have access to the MW UI modules.  However, if a JS gadget makes
a MW UI button, it's going to look however MW UI buttons look in the skin.  If
there are no MW UI styles in that skin, it's going to look totally unstyled.

There's not going to be an exception where FooSkin MW UI buttons from core
pages normally look like X, but gadgets running on a FooSkin wiki look like Y. 
All FooSkin MW UI buttons are going to look the same (except that constructive
looks different from progressive, etc.).

> All three should be options. We need a sane default (in core, that can be
> used by whatever skin if desired, and will be included in the main one(s))

That's the existing implementation.

> > > Is there any documentation on how to do that, or use the underlying
> > > framework? From where I'm standing it looks like the only option is to
> > > manually override all the styles, and when they keep changing and getting
> > > more complex, that's pretty horrible.
> > 
> > The basic tool is
> > https://www.mediawiki.org/wiki/Manual:$wgResourceModuleSkinStyles , along
> > with the discussion above about whether you're augmenting or replacing
> > styles (that is important re what I said about 'default').
> > 
> > Importantly, there are also mixins at
> > https://git.wikimedia.org/tree/mediawiki%2Fcore.git/
> > e2e6f7767ef58659904422c36d390c230b59852f/resources%2Fsrc%2Fmediawiki.less
> > which you can use (note the mediawiki.less/mediawiki.ui directory, which has
> > mixins and variables).  These can be imported with e.g.:
> > 
> > @import "mediawiki.ui/variables";
> 
> But if that's variables, what about the framework? What all can we change?

There are also mixins at mediawiki.ui/mixins (e.g. button-colors, which will
let you make MW UI-style buttons, but have your own color choices).  (I realize
some skins might want to go for a totally different button approach, but this
is one tool)

See 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/resources%2Fsrc%2Fmediawiki.less%2Fmediawiki.ui%2Fmixins.less

> How do we include the js for the form elements (since a lot simply CANNOT be
> styled with css alone)?

MediaWiki UI has no JavaScript currently, though it may be necessary for future
work.

> How do we create our own styles from the ground up,
> not just change some colours and crap? Or is that all in there somewhere?

If you're doing it from the ground up, basically the same as any other LESS or
CSS (you can use either).

You would then use +foo or foo (see
https://www.mediawiki.org/wiki/Manual:$wgResourceModuleSkinStyles) depending on
whether you're replacing the whole module, or augmenting it (MW UI itself is
broken into multiple modules, which will probably make your job easier, since
you can choose to e.g. replace the button module, but leave the checkbox module
intact).

This requires the 'default' thing I mentioned earlier, which I'll try to do
soon, since it doesn't actually hurt anything (even if no one actually makes a
skin-specific MW UI).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to