Commit Graph

47 Commits

Author SHA1 Message Date
Javi Martín
a2c032573f Rename brand-text mixin to brand-color
This is consistent with the `body-colors` mixin and with other mixins
we're about to add, like `anchor-color`.
2022-11-20 00:29:12 +01:00
Javi Martín
6cb4f4acde Extract mixin to get a background with text contrast
This way we simplify the code a bit.

Note we're only using this function when variables for background colors
are already defined, since that means customizing the variable using the
background color will automatically change the color of the text.
Customization isn't easier when using raw colors.
2022-10-28 13:58:04 +02:00
Javi Martín
1b1b5b5755 Use color-pick-contrast to get text colors
We were defining (for instance) white text against the `$brand`
background. That meant that, if somebody customized the `$brand` color
so it used a light color, they had to customize the text color as well
in order to guarantee proper contrast between text and background
colors.

So we're using `color-pick-contrast` instead, which means we don't have
to manually calculate whether white or black will be the color which
makes the text more readable.
2022-10-28 13:58:04 +02:00
Javi Martín
e050e5cc70 Remove redundant text color definitions
These elements were already using these colors because they inherited
them from their parent elements or Foundation already defined them.

Note that the only contents of `.comment-info` are: `.user-name` and
`.is-author`, `.is-association`, `.level-1`, ... and the link to the
comment. All of these elements were overwriting the `$text-medium`
color, so there's no need to set it. That means we can use the default
text color for `.user-name` without specifically setting it.
2022-10-27 01:10:31 +02:00
Javi Martín
5a654d2984 Remove obsolete CSS for the dashboard clipboard
This code isn't used since we removed the copy link feature in commit
5bbf325c1.
2022-10-13 16:03:40 +02:00
Javi Martín
73fe89829d Use $body-background to remove color duplication
We're using `background: #fff` and `background: $white` in many places.
Sometimes we mean "use the same background as the body", which means if
we change the body background so it's, let's say, dark, we'll also have
to change all these places.

So now we're using `$body-background` in more places, so changing the
general background color is easier.

There are still some places where we use `#fff` or `$white`. Sometimes
it's hard to tell whether the intention is "use a white background here"
or "use the same background as the body here". When in doubt, I've left
it the way it was.

Just for testing purposes, I've tested locally how things would look
like if we added this code to `_consul_custom_overrides.scss`:

```
$body-background: #fea;
$card-background: $body-background;
$tab-background: $body-background;
$tab-content-background: $body-background;
$table-background: $body-background;
```

Or:

```
$body-background: #333;
$text: #fcfcfc;
$body-font-color: $text;
$card-background: $body-background;
$tab-background: $body-background;
$tab-content-background: $body-background;
$table-background: $body-background;
```

Testing shows we've still got a long way to go to make it easy to add
custom color themes, since there are many custom colors in the code.
Hopefully these changes bring us one step closer.
2021-06-30 16:42:53 +02:00
Javi Martín
ae66211c34 Simplify colors in dashboard icons
We can just inherit the colors; no need to define them explicitly.
2021-06-30 16:42:53 +02:00
Javi Martín
b2a05322fd Simplify using current color on borders
Using `currentcolor` is IMHO more expressive, since it shows the
intention of styling the border with the same color as the text.

This is particularly useful for CONSUL installations using custom
styles. Consider the following code:

```
.is-active {
  border: 1px solid $brand;
  color: $brand;
}
```

If we'd like to customize the way active items look, we'd have to
override two colors:

```
.is-active {
  border: 1px solid $brand-secondary;
  color: $brand-secondary;
}
```

Consider the scenario where we use `currentcolor` (which is the default
border color):

```
.is-active {
  border: 1px solid;
  color: $brand;
}
```

Now we only need to override one color to change the styles:

```
.is-active {
  color: $brand-secondary;
}
```
2021-06-29 20:03:36 +02:00
Javi Martín
80dbdeec98 Simplify borders in dashboard resource cards
In both cases we were using a 2px solid border with the color of the
current text, so we can write the rule once and without defining the
colors.
2021-06-29 20:03:36 +02:00
Javi Martín
8e8a4d784c Simplify using text color for links
Using `inherit` is IMHO more expressive since it means "use the color of
the parent element".

This is particularly useful for CONSUL installations using custom
styles. Consider the following code:

```
h2 {
  color: $white;

  a {
    color: $white;
  }
}
```

If we'd like to customize the way headings look, we'd have to override
two colors:

```
h2 {
  color: $red;

  a {
    color: $red;
  }
}
```

Consider the scenario where we use `inherit`:

```
h2 {
  color: $white;

  a {
    color: inherit;
  }
}
```

Now we only need to override one color to change the styles:

```
h2 {
  color: $red;
}
```
2021-06-29 19:45:09 +02:00
Javi Martín
f27d1231bb Remove unused CSS selector
In the dashboard navigation, each link is inside a list item, so the
selector `a ~ a` is never used.
2021-06-29 19:41:58 +02:00
Javi Martín
6ea9383743 Allow toggling elements with the keyboard
Using `<a>` tags with no `href` means these elements cannot be activated
by keyboard users, so we're replacing them with buttons.

In the future we probably want to add more consistency so all toggle
buttons use the same code. We might also add styles depending on the
`aria-expanded` property.
2021-03-31 13:38:38 +02:00
Javi Martín
4bb12c573f Fix invisible text selection on brand text
When an element had a text using the brand color and was a child of an
element with a brand background, the selection was invisible.
2021-03-24 15:48:24 +01:00
Javi Martín
7880573635 Make the admin menu fill the screen vertically
On high-resolution screens where neither the menu nor the main content
were filling the screen, there was a blank space at the bottom which
looked weird.
2020-09-21 15:15:52 +02:00
decabeza
2363aa4c76 Avoid using a mixin for side menu and content styles 2020-09-21 15:14:20 +02:00
Javi Martín
42106e6601 Fix double scroll bar in admin content
We were using `overflow: scroll` as a workaround with a problem we had
with the equalizer. But now we never need an extra vertical scroll bar,
and we only need an extra horizontal scroll bar on small screens.

Since the dashboard was using the class `admin-content` as well, we need
to apply to the dashboard the same changes we've done in the admin
section. I've extracted them into a mixin.
2019-12-19 16:02:31 +01:00
decabeza
abf04bea4c Add related content section on proposal dashboard 2019-09-11 19:45:19 +02:00
decabeza
197cbcd9bd Fix styles of dashboard poster 2019-04-29 15:46:35 +02:00
decabeza
aa960ac50a Prevent long action content break dashboard layout 2019-04-24 14:08:15 +02:00
decabeza
f8b34f7066 Make cursor not change on has-tip css class 2019-04-24 13:57:16 +02:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Alberto
29a87e2746 Merge branch 'dashboard' into dashboard-polish 2019-03-26 12:19:20 +01:00
Alessandro Cuoghi
e876c07579 Left-aligned label 2019-03-21 12:29:31 +01:00
decabeza
e949d4d163 Refactor proposal total counter value 2019-03-19 16:59:57 +01:00
Alberto
7b2258aeb0 Merge pull request #3263 from Platoniq/dashboard-recommended-actions-page
Dashboard recommended actions page
2019-03-19 16:21:28 +01:00
Alberto
093a8cdb10 Merge pull request #3261 from Platoniq/dashboard-poster-email-styles
Dashboard poster email styles
2019-03-19 16:21:20 +01:00
Alessandro Cuoghi
af71ef0c35 Add style
- Inverted h2 with h3
- Add strong tag
2019-02-04 16:20:35 +01:00
Alessandro Cuoghi
d81d1537d0 Created new quotes
- Created blue images quotes
- Added quotes images to preview poster
- Added quotes images to download poster
- Removed reference to Decide Madrid and use %{org}
- Removed reference to decide.madrid.es and use %{link}
- FIxed some style (font, padding, maring) in PDF
- Passed scss-lint
2019-02-02 19:18:27 +01:00
Alessandro Cuoghi
44964c35f9 Added quotes images
- Created white quote images png (before and after)
- Added images quotes to preview email and email.
- Added max width to images quotes png
2019-02-02 19:18:27 +01:00
Alessandro Cuoghi
394a7e55ee Fixed some style preview email and email
- Removed class large-7
- Changed font size preview-email and email
- Changed text color in the email
- Changed some font size and padding in the email
- Added some padding in preview email
- Pass scss-lint
- Changed padding and added font size.
2019-02-02 19:18:27 +01:00
Alessandro Cuoghi
70171b0e17 Fix PDF and email
- Inserted normal quotation marks
- Remove class quote
- Added max width mail preview
- Added some styles in the email
- Added image decide_madrid at the end of the email
- Added cover to the image preview poster and PDF
- Passed scss lint
2019-02-02 19:18:27 +01:00
Alessandro Cuoghi
003d3e82b0 Convert Color to Variables
- Added two temporal variables for colors. (Deciding how to call these new variables)
- Replaced hexadecimal with variable
- Remove white space in the html
2019-02-02 19:18:26 +01:00
Alessandro Cuoghi
145e0ae659 Show Preview only in Large version
- Add class Foundation show-for-large
- Fixed width Preview so as not to make it responsive
2019-02-02 19:18:26 +01:00
Alessandro Cuoghi
f317514258 Change Finger icon SVG to PNG
- Suggestion DeCabeza until FontAwesome is inserted.
- Remove SVG and convert to PNG
2019-02-02 19:18:26 +01:00
Alessandro Cuoghi
5fd9b2b633 Change quote and fix font
- Created new quotation marks without svg - Greater flexibility

- Fix font Lato in PDF - change font family in pdf_font
2019-02-02 19:18:26 +01:00
Alessandro Cuoghi
4ec858f1a0 Email Style
- Added style as per email sent
- Change color
- Changed alignment title
- Added image decide madrid
- Added Shadow to image
2019-02-02 19:18:26 +01:00
Alessandro Cuoghi
8064ac3779 Converted the tag image into background image
- Converted the TAG image into background image inside an overflow container because the height of the image in the pdf pushes to create 2 pages.

- Remove unused css
-
2019-02-02 19:18:26 +01:00
Alessandro Cuoghi
1d910c0073 Style PDF
- Added icon finger
- Chnage color quote
- Add class icon-finger
- Add some style
- Remove Open Sans
- Arranged the content in the A4
- Remove some style css
2019-02-02 19:18:24 +01:00
Alessandro Cuoghi
981e718a48 Style Generate Pdf
- Change some style
- Fixing the bug to the svg that was not rendered
- Change some rem  to cm
- The Lato font does not render well while Open Sans is correct. Strong and normal weight.
2019-02-02 19:17:59 +01:00
Alessandro Cuoghi
667039b127 Style Preview Pdf
- Customized the preview as shown by email
- Added two svg for quote icons. (Need convert to font)
- Ceate two class for quote icons.
- Added tag strong into yml for text decoration
- Customize css
2019-02-02 19:17:33 +01:00
Alessandro Cuoghi
5c6abce8ee Fixed css order and depth
- Reordered the properties of the css to pass houndci-bot verification
2019-02-02 17:33:55 +01:00
Alessandro Cuoghi
36abba15e6 Dashboard proposals stats V.2
- Found new solution to show dashboard proposals stats
- Added new class for behaviour change in the medium version
- Moved the progress bar to the bottom
- Moved below by adding counter-label class to the text support
- Added class to support text to push under the counter
2019-02-02 17:33:55 +01:00
Alessandro Cuoghi
e0fa82a533 Change layout dashboard proposals stats
Created new layout to avoid text jump support
2019-02-02 17:33:55 +01:00
Alberto
938494aef5 Merge pull request #2972 from consul/dashboard-pdf
Dashboard PDF
2018-10-17 17:19:29 +02:00
decabeza
bd1ba2bc78 Adds styles to dashboard poster 2018-10-17 01:12:09 +02:00
decabeza
5d00952b05 Improves styles for dashboard mailer preview 2018-10-13 13:01:38 +02:00
decabeza
775b4698be Moves all new styles to dashboard.scss 2018-10-05 18:52:04 +02:00