This function allows you to define additional CSS styles for your widget. The styles specified are only applied to this widget and its elements. Overwriting the function is optional. If no custom implementation is specified, the content of the style.css file is loaded into the widgets directory, if it exists.
Example 1:
public function getStyles()
{
return '
.my-widget {
font-family: Comic Sans MS;
.my-custom-container {
color: red;
}
}
';
}
Example 2:
public function getStyles()
{
return file_get_contents($this->getWidgetFilePath('my-style.css'));
}